v1

package
v0.0.0-...-81741d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Identifier protocol.Identifier = "v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Operations

type Operations struct {
	// contains filtered or unexported fields
}

func (*Operations) Alive

func (o *Operations) Alive(ctx context.Context) (bool, error)

Alive implements protocol.Operations.

func (*Operations) ApplyConfiguration

func (o *Operations) ApplyConfiguration(ctx context.Context, config *model.Configuration) (string, *model.Configuration, error)

func (*Operations) Close

func (o *Operations) Close(ctx context.Context) error

Close implements protocol.Operations.

func (*Operations) Configuration

func (o *Operations) Configuration(ctx context.Context) (any, error)

Configuration implements protocol.Operations.

func (*Operations) Connect

func (o *Operations) Connect(ctx context.Context) error

Connect implements protocol.Operations.

func (*Operations) Emit

func (o *Operations) Emit(ctx context.Context, mType string, message any) error

Emit implements protocol.Operations.

func (*Operations) GetBaseInfo

func (o *Operations) GetBaseInfo(ctx context.Context) (*protocol.BaseInfo, error)

GetBaseInfo implements protocol.Operations.

func (*Operations) On

func (o *Operations) On(ctx context.Context, event string) (chan any, error)

On implements protocol.Operations.

func (*Operations) Reboot

func (o *Operations) Reboot(ctx context.Context) error

Reboot implements protocol.Operations.

func (*Operations) ReqResp

func (o *Operations) ReqResp(ctx context.Context,
	requestEvent string, requestData any,
	responseEvent string, res any) error

ReqResp emits an event with the given data and waits for a response

func (*Operations) RequestConfiguration

func (o *Operations) RequestConfiguration(ctx context.Context) (*model.Configuration, error)

func (*Operations) SetBase

func (o *Operations) SetBase(ctx context.Context, funcs ...protocol.SetBaseOptionFunc) error

SetBase implements protocol.Operations.

func (*Operations) Version

func (o *Operations) Version(ctx context.Context) (string, bool, error)

Version implements protocol.Operations.

type Protocol

type Protocol struct {
	// contains filtered or unexported fields
}

func (*Protocol) Available

func (p *Protocol) Available(ctx context.Context, addr string) (bool, error)

Available implements protocol.Protocol.

func (*Protocol) Identifier

func (p *Protocol) Identifier() protocol.Identifier

Identifier implements protocol.Protocol.

func (*Protocol) Operations

func (p *Protocol) Operations(addr string) protocol.Operations

Operations implements protocol.Protocol.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL