extperipheral

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(logger log.Interface, impl PeripheralConnector) *Handler

func (*Handler) HandleCmd

func (c *Handler) HandleCmd(id uint64, kind arhatgopb.CmdType, payload []byte) (proto.Marshaler, error)

type Peripheral

type Peripheral interface {
	Operate(params map[string]string, data []byte) ([][]byte, error)
	CollectMetrics(params map[string]string) ([]*arhatgopb.PeripheralMetricsMsg_Value, error)
	Close()
}

type PeripheralConnector

type PeripheralConnector interface {
	Connect(target string, params map[string]string, tlsConfig *arhatgopb.TLSConfig) (Peripheral, error)
}

Jump to

Keyboard shortcuts

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