protocol

package
v0.0.0-...-3a8cc73 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(proto *Protocol)

Types

type Adapter

type Adapter interface {
	Get(device *types.Device, name string) (any, error)
	Set(device *types.Device, name string, value any) error
	Sync(device *types.Device) (map[string]any, error)
}

func Create

func Create(tunnel string, conn connect.Conn, name string, opts types.Options) (Adapter, error)

type Factory

type Factory func(tunnel string, conn connect.Conn, opts types.Options) (Adapter, error)

type Protocol

type Protocol struct {
	Name    string
	Label   string
	Factory Factory
}

func Protocols

func Protocols() []*Protocol

Jump to

Keyboard shortcuts

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