tele_api

package
v0.210704.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	Payload []byte
	VmId    int32
	Kind    PacketKind
}

func (*Packet) CommandResponse

func (p *Packet) CommandResponse() (*vender_api.Response, error)

func (*Packet) State

func (p *Packet) State() (vender_api.State, error)

func (*Packet) String

func (p *Packet) String() string

func (*Packet) Telemetry

func (p *Packet) Telemetry() (*vender_api.Telemetry, error)

type PacketKind

type PacketKind uint8
const (
	PacketInvalid PacketKind = iota
	PacketConnect
	PacketState
	PacketTelemetry
	PacketCommand
	PacketCommandReply
)

func (PacketKind) String

func (i PacketKind) String() string

type Teler

type Teler interface {
	Init(context.Context, *log2.Log, tele_config.Config) error
	Close() error
	Addrs() []string
	Chan() <-chan Packet
	CommandTx(vmid int32, c *vender_api.Command) (*vender_api.Response, error)
}

func NewStub

func NewStub() Teler

Jump to

Keyboard shortcuts

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