connector

package
v0.0.0-...-494a71a Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionInit          = "init"
	ActionDeviceAdd     = "addDevice"
	ActionDeviceRemove  = "removeDevice"
	ActionDeviceRelease = "releaseDevice"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	Id      string `json:"id"`
	Name    string `json:"name"`
	OS      string `json:"os"`
	Arch    string `json:"arch"`
	Group   string `json:"group"`
	Address string `json:"address"`

	RemoteIp string `json:"-"`
	// contains filtered or unexported fields
}

func New

func New(host string, group string, listenPort int) *Connector

func (*Connector) AddDevice

func (w *Connector) AddDevice(id string, device interface{})

func (*Connector) Do

func (w *Connector) Do(action string, data interface{})

func (*Connector) KeepOnline

func (w *Connector) KeepOnline()

func (*Connector) WriteJSON

func (w *Connector) WriteJSON(v interface{})

Jump to

Keyboard shortcuts

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