tele

package
v0.210504.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: CC0-1.0 Imports: 7 Imported by: 4

Documentation

Overview

Package tele is vender telemetry network/binary API for external usage. Current implementation is MQTT protocol with protobuf payload from tele.proto. Teler.State() sends 1 byte(enum State) to topic vm%d/w/1s

Index

Constants

This section is empty.

Variables

View Source
var PaymentMethod_name = map[int32]string{
	0: "Nothing",
	1: "Cash",
	2: "Cashless",
	3: "Gift",
	4: "Balance",
}
View Source
var PaymentMethod_value = map[string]int32{
	"Nothing":  0,
	"Cash":     1,
	"Cashless": 2,
	"Gift":     3,
	"Balance":  4,
}
View Source
var Priority_name = map[int32]string{
	0: "Default",
	1: "Now",
	2: "IdleEngine",
	4: "IdleUser",
}
View Source
var Priority_value = map[string]int32{
	"Default":    0,
	"Now":        1,
	"IdleEngine": 2,
	"IdleUser":   4,
}
View Source
var State_name = map[int32]string{
	0: "Invalid",
	1: "Boot",
	2: "Nominal",
	3: "Disconnected",
	4: "Problem",
	5: "Service",
	6: "Lock",
	7: "Client",
}
View Source
var State_value = map[string]int32{
	"Invalid":      0,
	"Boot":         1,
	"Nominal":      2,
	"Disconnected": 3,
	"Problem":      4,
	"Service":      5,
	"Lock":         6,
	"Client":       7,
}

Functions

This section is empty.

Types

type Command

type Command struct {
	Id         uint32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ReplyTopic string   `protobuf:"bytes,2,opt,name=reply_topic,json=replyTopic,proto3" json:"reply_topic,omitempty"`
	Deadline   int64    `protobuf:"varint,3,opt,name=deadline,proto3" json:"deadline,omitempty"`
	Priority   Priority `protobuf:"varint,4,opt,name=priority,proto3,enum=tele.Priority" json:"priority,omitempty"`
	// Types that are valid to be assigned to Task:
	//	*Command_Report
	//	*Command_Lock
	//	*Command_Exec
	//	*Command_SetInventory
	//	*Command_SetConfig
	//	*Command_Stop
	//	*Command_Show_QR
	Task                 isCommand_Task `protobuf_oneof:"task"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Command) Descriptor

func (*Command) Descriptor() ([]byte, []int)

func (*Command) GetDeadline

func (m *Command) GetDeadline() int64

func (*Command) GetExec

func (m *Command) GetExec() *Command_ArgExec

func (*Command) GetId

func (m *Command) GetId() uint32

func (*Command) GetLock

func (m *Command) GetLock() *Command_ArgLock

func (*Command) GetPriority

func (m *Command) GetPriority() Priority

func (*Command) GetReplyTopic

func (m *Command) GetReplyTopic() string

func (*Command) GetReport

func (m *Command) GetReport() *Command_ArgReport

func (*Command) GetSetConfig

func (m *Command) GetSetConfig() *Command_ArgSetConfig

func (*Command) GetSetInventory

func (m *Command) GetSetInventory() *Command_ArgSetInventory

func (*Command) GetShow_QR added in v0.200320.0

func (m *Command) GetShow_QR() *Command_ArgShowQR

func (*Command) GetStop

func (m *Command) GetStop() *Command_ArgStop

func (*Command) GetTask

func (m *Command) GetTask() isCommand_Task

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) Reset

func (m *Command) Reset()

func (*Command) String

func (m *Command) String() string

func (*Command) XXX_DiscardUnknown

func (m *Command) XXX_DiscardUnknown()

func (*Command) XXX_Marshal

func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command) XXX_Merge

func (dst *Command) XXX_Merge(src proto.Message)

func (*Command) XXX_OneofFuncs

func (*Command) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Command) XXX_Size

func (m *Command) XXX_Size() int

func (*Command) XXX_Unmarshal

func (m *Command) XXX_Unmarshal(b []byte) error

type Command_ArgExec

type Command_ArgExec struct {
	Scenario             string   `protobuf:"bytes,1,opt,name=scenario,proto3" json:"scenario,omitempty"`
	Lock                 bool     `protobuf:"varint,2,opt,name=lock,proto3" json:"lock,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Command_ArgExec) Descriptor

func (*Command_ArgExec) Descriptor() ([]byte, []int)

func (*Command_ArgExec) GetLock

func (m *Command_ArgExec) GetLock() bool

func (*Command_ArgExec) GetScenario

func (m *Command_ArgExec) GetScenario() string

func (*Command_ArgExec) ProtoMessage

func (*Command_ArgExec) ProtoMessage()

func (*Command_ArgExec) Reset

func (m *Command_ArgExec) Reset()

func (*Command_ArgExec) String

func (m *Command_ArgExec) String() string

func (*Command_ArgExec) XXX_DiscardUnknown

func (m *Command_ArgExec) XXX_DiscardUnknown()

func (*Command_ArgExec) XXX_Marshal

func (m *Command_ArgExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command_ArgExec) XXX_Merge

func (dst *Command_ArgExec) XXX_Merge(src proto.Message)

func (*Command_ArgExec) XXX_Size

func (m *Command_ArgExec) XXX_Size() int

func (*Command_ArgExec) XXX_Unmarshal

func (m *Command_ArgExec) XXX_Unmarshal(b []byte) error

type Command_ArgLock

type Command_ArgLock struct {
	Duration             int32    `protobuf:"varint,1,opt,name=duration,proto3" json:"duration,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Command_ArgLock) Descriptor

func (*Command_ArgLock) Descriptor() ([]byte, []int)

func (*Command_ArgLock) GetDuration

func (m *Command_ArgLock) GetDuration() int32

func (*Command_ArgLock) ProtoMessage

func (*Command_ArgLock) ProtoMessage()

func (*Command_ArgLock) Reset

func (m *Command_ArgLock) Reset()

func (*Command_ArgLock) String

func (m *Command_ArgLock) String() string

func (*Command_ArgLock) XXX_DiscardUnknown

func (m *Command_ArgLock) XXX_DiscardUnknown()

func (*Command_ArgLock) XXX_Marshal

func (m *Command_ArgLock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command_ArgLock) XXX_Merge

func (dst *Command_ArgLock) XXX_Merge(src proto.Message)

func (*Command_ArgLock) XXX_Size

func (m *Command_ArgLock) XXX_Size() int

func (*Command_ArgLock) XXX_Unmarshal

func (m *Command_ArgLock) XXX_Unmarshal(b []byte) error

type Command_ArgReport

type Command_ArgReport struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Command_ArgReport) Descriptor

func (*Command_ArgReport) Descriptor() ([]byte, []int)

func (*Command_ArgReport) ProtoMessage

func (*Command_ArgReport) ProtoMessage()

func (*Command_ArgReport) Reset

func (m *Command_ArgReport) Reset()

func (*Command_ArgReport) String

func (m *Command_ArgReport) String() string

func (*Command_ArgReport) XXX_DiscardUnknown

func (m *Command_ArgReport) XXX_DiscardUnknown()

func (*Command_ArgReport) XXX_Marshal

func (m *Command_ArgReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command_ArgReport) XXX_Merge

func (dst *Command_ArgReport) XXX_Merge(src proto.Message)

func (*Command_ArgReport) XXX_Size

func (m *Command_ArgReport) XXX_Size() int

func (*Command_ArgReport) XXX_Unmarshal

func (m *Command_ArgReport) XXX_Unmarshal(b []byte) error

type Command_ArgSetConfig

type Command_ArgSetConfig struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	New                  []byte   `protobuf:"bytes,2,opt,name=new,proto3" json:"new,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Command_ArgSetConfig) Descriptor

func (*Command_ArgSetConfig) Descriptor() ([]byte, []int)

func (*Command_ArgSetConfig) GetName

func (m *Command_ArgSetConfig) GetName() string

func (*Command_ArgSetConfig) GetNew

func (m *Command_ArgSetConfig) GetNew() []byte

func (*Command_ArgSetConfig) ProtoMessage

func (*Command_ArgSetConfig) ProtoMessage()

func (*Command_ArgSetConfig) Reset

func (m *Command_ArgSetConfig) Reset()

func (*Command_ArgSetConfig) String

func (m *Command_ArgSetConfig) String() string

func (*Command_ArgSetConfig) XXX_DiscardUnknown

func (m *Command_ArgSetConfig) XXX_DiscardUnknown()

func (*Command_ArgSetConfig) XXX_Marshal

func (m *Command_ArgSetConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command_ArgSetConfig) XXX_Merge

func (dst *Command_ArgSetConfig) XXX_Merge(src proto.Message)

func (*Command_ArgSetConfig) XXX_Size

func (m *Command_ArgSetConfig) XXX_Size() int

func (*Command_ArgSetConfig) XXX_Unmarshal

func (m *Command_ArgSetConfig) XXX_Unmarshal(b []byte) error

type Command_ArgSetInventory

type Command_ArgSetInventory struct {
	New                  *Inventory `protobuf:"bytes,1,opt,name=new,proto3" json:"new,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*Command_ArgSetInventory) Descriptor

func (*Command_ArgSetInventory) Descriptor() ([]byte, []int)

func (*Command_ArgSetInventory) GetNew

func (m *Command_ArgSetInventory) GetNew() *Inventory

func (*Command_ArgSetInventory) ProtoMessage

func (*Command_ArgSetInventory) ProtoMessage()

func (*Command_ArgSetInventory) Reset

func (m *Command_ArgSetInventory) Reset()

func (*Command_ArgSetInventory) String

func (m *Command_ArgSetInventory) String() string

func (*Command_ArgSetInventory) XXX_DiscardUnknown

func (m *Command_ArgSetInventory) XXX_DiscardUnknown()

func (*Command_ArgSetInventory) XXX_Marshal

func (m *Command_ArgSetInventory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command_ArgSetInventory) XXX_Merge

func (dst *Command_ArgSetInventory) XXX_Merge(src proto.Message)

func (*Command_ArgSetInventory) XXX_Size

func (m *Command_ArgSetInventory) XXX_Size() int

func (*Command_ArgSetInventory) XXX_Unmarshal

func (m *Command_ArgSetInventory) XXX_Unmarshal(b []byte) error

type Command_ArgShowQR added in v0.200320.0

type Command_ArgShowQR struct {
	Layout               string   `protobuf:"bytes,1,opt,name=layout,proto3" json:"layout,omitempty"`
	QrText               string   `protobuf:"bytes,2,opt,name=qr_text,json=qrText,proto3" json:"qr_text,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Command_ArgShowQR) Descriptor added in v0.200320.0

func (*Command_ArgShowQR) Descriptor() ([]byte, []int)

func (*Command_ArgShowQR) GetLayout added in v0.200320.0

func (m *Command_ArgShowQR) GetLayout() string

func (*Command_ArgShowQR) GetQrText added in v0.200320.0

func (m *Command_ArgShowQR) GetQrText() string

func (*Command_ArgShowQR) ProtoMessage added in v0.200320.0

func (*Command_ArgShowQR) ProtoMessage()

func (*Command_ArgShowQR) Reset added in v0.200320.0

func (m *Command_ArgShowQR) Reset()

func (*Command_ArgShowQR) String added in v0.200320.0

func (m *Command_ArgShowQR) String() string

func (*Command_ArgShowQR) XXX_DiscardUnknown added in v0.200320.0

func (m *Command_ArgShowQR) XXX_DiscardUnknown()

func (*Command_ArgShowQR) XXX_Marshal added in v0.200320.0

func (m *Command_ArgShowQR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command_ArgShowQR) XXX_Merge added in v0.200320.0

func (dst *Command_ArgShowQR) XXX_Merge(src proto.Message)

func (*Command_ArgShowQR) XXX_Size added in v0.200320.0

func (m *Command_ArgShowQR) XXX_Size() int

func (*Command_ArgShowQR) XXX_Unmarshal added in v0.200320.0

func (m *Command_ArgShowQR) XXX_Unmarshal(b []byte) error

type Command_ArgStop

type Command_ArgStop struct {
	Timeout              int32    `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Command_ArgStop) Descriptor

func (*Command_ArgStop) Descriptor() ([]byte, []int)

func (*Command_ArgStop) GetTimeout

func (m *Command_ArgStop) GetTimeout() int32

func (*Command_ArgStop) ProtoMessage

func (*Command_ArgStop) ProtoMessage()

func (*Command_ArgStop) Reset

func (m *Command_ArgStop) Reset()

func (*Command_ArgStop) String

func (m *Command_ArgStop) String() string

func (*Command_ArgStop) XXX_DiscardUnknown

func (m *Command_ArgStop) XXX_DiscardUnknown()

func (*Command_ArgStop) XXX_Marshal

func (m *Command_ArgStop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command_ArgStop) XXX_Merge

func (dst *Command_ArgStop) XXX_Merge(src proto.Message)

func (*Command_ArgStop) XXX_Size

func (m *Command_ArgStop) XXX_Size() int

func (*Command_ArgStop) XXX_Unmarshal

func (m *Command_ArgStop) XXX_Unmarshal(b []byte) error

type Command_Exec

type Command_Exec struct {
	Exec *Command_ArgExec `protobuf:"bytes,18,opt,name=exec,proto3,oneof"`
}

type Command_Lock

type Command_Lock struct {
	Lock *Command_ArgLock `protobuf:"bytes,17,opt,name=lock,proto3,oneof"`
}

type Command_Report

type Command_Report struct {
	Report *Command_ArgReport `protobuf:"bytes,16,opt,name=report,proto3,oneof"`
}

type Command_SetConfig

type Command_SetConfig struct {
	SetConfig *Command_ArgSetConfig `protobuf:"bytes,20,opt,name=set_config,json=setConfig,proto3,oneof"`
}

type Command_SetInventory

type Command_SetInventory struct {
	SetInventory *Command_ArgSetInventory `protobuf:"bytes,19,opt,name=set_inventory,json=setInventory,proto3,oneof"`
}

type Command_Show_QR added in v0.200320.0

type Command_Show_QR struct {
	Show_QR *Command_ArgShowQR `protobuf:"bytes,22,opt,name=show_QR,json=showQR,proto3,oneof"`
}

type Command_Stop

type Command_Stop struct {
	Stop *Command_ArgStop `protobuf:"bytes,21,opt,name=stop,proto3,oneof"`
}

type Inventory

type Inventory struct {
	Stocks               []*Inventory_StockItem `protobuf:"bytes,1,rep,name=stocks,proto3" json:"stocks,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*Inventory) Descriptor

func (*Inventory) Descriptor() ([]byte, []int)

func (*Inventory) GetStocks

func (m *Inventory) GetStocks() []*Inventory_StockItem

func (*Inventory) ProtoMessage

func (*Inventory) ProtoMessage()

func (*Inventory) Reset

func (m *Inventory) Reset()

func (*Inventory) String

func (m *Inventory) String() string

func (*Inventory) XXX_DiscardUnknown

func (m *Inventory) XXX_DiscardUnknown()

func (*Inventory) XXX_Marshal

func (m *Inventory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Inventory) XXX_Merge

func (dst *Inventory) XXX_Merge(src proto.Message)

func (*Inventory) XXX_Size

func (m *Inventory) XXX_Size() int

func (*Inventory) XXX_Unmarshal

func (m *Inventory) XXX_Unmarshal(b []byte) error

type Inventory_StockItem

type Inventory_StockItem struct {
	Code                 uint32   `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Value                int32    `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Hopper               int32    `protobuf:"varint,4,opt,name=hopper,proto3" json:"hopper,omitempty"`
	Valuef               float32  `protobuf:"fixed32,5,opt,name=valuef,proto3" json:"valuef,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Inventory_StockItem) Descriptor

func (*Inventory_StockItem) Descriptor() ([]byte, []int)

func (*Inventory_StockItem) GetCode

func (m *Inventory_StockItem) GetCode() uint32

func (*Inventory_StockItem) GetHopper

func (m *Inventory_StockItem) GetHopper() int32

func (*Inventory_StockItem) GetName

func (m *Inventory_StockItem) GetName() string

func (*Inventory_StockItem) GetValue

func (m *Inventory_StockItem) GetValue() int32

func (*Inventory_StockItem) GetValuef

func (m *Inventory_StockItem) GetValuef() float32

func (*Inventory_StockItem) ProtoMessage

func (*Inventory_StockItem) ProtoMessage()

func (*Inventory_StockItem) Reset

func (m *Inventory_StockItem) Reset()

func (*Inventory_StockItem) String

func (m *Inventory_StockItem) String() string

func (*Inventory_StockItem) XXX_DiscardUnknown

func (m *Inventory_StockItem) XXX_DiscardUnknown()

func (*Inventory_StockItem) XXX_Marshal

func (m *Inventory_StockItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Inventory_StockItem) XXX_Merge

func (dst *Inventory_StockItem) XXX_Merge(src proto.Message)

func (*Inventory_StockItem) XXX_Size

func (m *Inventory_StockItem) XXX_Size() int

func (*Inventory_StockItem) XXX_Unmarshal

func (m *Inventory_StockItem) XXX_Unmarshal(b []byte) error

type Noop

type Noop struct{}

func (Noop) Close

func (Noop) Close()

func (Noop) Error

func (Noop) Error(error)

func (Noop) Init

func (Noop) Report

func (Noop) Report(ctx context.Context, serviceTag bool) error

func (Noop) StatModify

func (Noop) StatModify(func(*Stat))

func (Noop) State

func (Noop) State(State)

func (Noop) Transaction

func (Noop) Transaction(*Telemetry_Transaction)

type PaymentMethod

type PaymentMethod int32
const (
	PaymentMethod_Nothing  PaymentMethod = 0
	PaymentMethod_Cash     PaymentMethod = 1
	PaymentMethod_Cashless PaymentMethod = 2
	PaymentMethod_Gift     PaymentMethod = 3
	PaymentMethod_Balance  PaymentMethod = 4
)

func (PaymentMethod) EnumDescriptor

func (PaymentMethod) EnumDescriptor() ([]byte, []int)

func (PaymentMethod) String

func (x PaymentMethod) String() string

type Priority

type Priority int32
const (
	Priority_Default    Priority = 0
	Priority_Now        Priority = 1
	Priority_IdleEngine Priority = 2
	Priority_IdleUser   Priority = 4
)

func (Priority) EnumDescriptor

func (Priority) EnumDescriptor() ([]byte, []int)

func (Priority) String

func (x Priority) String() string

type Response

type Response struct {
	CommandId            uint32   `protobuf:"varint,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
	Error                string   `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	Data                 string   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	INTERNALTopic        string   `protobuf:"bytes,2048,opt,name=INTERNAL_topic,json=INTERNALTopic,proto3" json:"INTERNAL_topic,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) GetCommandId

func (m *Response) GetCommandId() uint32

func (*Response) GetData

func (m *Response) GetData() string

func (*Response) GetError

func (m *Response) GetError() string

func (*Response) GetINTERNALTopic

func (m *Response) GetINTERNALTopic() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type Stat

type Stat struct {
	sync.Mutex
	Telemetry_Stat
}

TODO try github.com/rcrowley/go-metrics Low priority telemetry buffer. Can be updated at any time. Sent together with more important data or on `Command_Report`

func (*Stat) Locked_Reset

func (self *Stat) Locked_Reset()

Internal for tele package. Caller must hold self.Mutex.

type State

type State int32
const (
	State_Invalid      State = 0
	State_Boot         State = 1
	State_Nominal      State = 2
	State_Disconnected State = 3
	State_Problem      State = 4
	State_Service      State = 5
	State_Lock         State = 6
	State_Client       State = 7
)

func (State) EnumDescriptor

func (State) EnumDescriptor() ([]byte, []int)

func (State) String

func (x State) String() string

type Telemetry

type Telemetry struct {
	VmId                 int32                  `protobuf:"varint,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"`
	Time                 int64                  `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	Error                *Telemetry_Error       `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	Inventory            *Inventory             `protobuf:"bytes,4,opt,name=inventory,proto3" json:"inventory,omitempty"`
	MoneyCashbox         *Telemetry_Money       `protobuf:"bytes,5,opt,name=money_cashbox,json=moneyCashbox,proto3" json:"money_cashbox,omitempty"`
	Transaction          *Telemetry_Transaction `protobuf:"bytes,6,opt,name=transaction,proto3" json:"transaction,omitempty"`
	Stat                 *Telemetry_Stat        `protobuf:"bytes,7,opt,name=stat,proto3" json:"stat,omitempty"`
	MoneySave            *Telemetry_Money       `protobuf:"bytes,8,opt,name=money_save,json=moneySave,proto3" json:"money_save,omitempty"`
	MoneyChange          *Telemetry_Money       `protobuf:"bytes,9,opt,name=money_change,json=moneyChange,proto3" json:"money_change,omitempty"`
	AtService            bool                   `protobuf:"varint,16,opt,name=at_service,json=atService,proto3" json:"at_service,omitempty"`
	BuildVersion         string                 `protobuf:"bytes,17,opt,name=build_version,json=buildVersion,proto3" json:"build_version,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

Optimising for rare, bulk delivery on cell network. "Touching network" is expensive, while 10 or 900 bytes is about same cost.

func (*Telemetry) Descriptor

func (*Telemetry) Descriptor() ([]byte, []int)

func (*Telemetry) GetAtService

func (m *Telemetry) GetAtService() bool

func (*Telemetry) GetBuildVersion

func (m *Telemetry) GetBuildVersion() string

func (*Telemetry) GetError

func (m *Telemetry) GetError() *Telemetry_Error

func (*Telemetry) GetInventory

func (m *Telemetry) GetInventory() *Inventory

func (*Telemetry) GetMoneyCashbox

func (m *Telemetry) GetMoneyCashbox() *Telemetry_Money

func (*Telemetry) GetMoneyChange

func (m *Telemetry) GetMoneyChange() *Telemetry_Money

func (*Telemetry) GetMoneySave

func (m *Telemetry) GetMoneySave() *Telemetry_Money

func (*Telemetry) GetStat

func (m *Telemetry) GetStat() *Telemetry_Stat

func (*Telemetry) GetTime

func (m *Telemetry) GetTime() int64

func (*Telemetry) GetTransaction

func (m *Telemetry) GetTransaction() *Telemetry_Transaction

func (*Telemetry) GetVmId

func (m *Telemetry) GetVmId() int32

func (*Telemetry) ProtoMessage

func (*Telemetry) ProtoMessage()

func (*Telemetry) Reset

func (m *Telemetry) Reset()

func (*Telemetry) String

func (m *Telemetry) String() string

func (*Telemetry) XXX_DiscardUnknown

func (m *Telemetry) XXX_DiscardUnknown()

func (*Telemetry) XXX_Marshal

func (m *Telemetry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Telemetry) XXX_Merge

func (dst *Telemetry) XXX_Merge(src proto.Message)

func (*Telemetry) XXX_Size

func (m *Telemetry) XXX_Size() int

func (*Telemetry) XXX_Unmarshal

func (m *Telemetry) XXX_Unmarshal(b []byte) error

type Telemetry_Error

type Telemetry_Error struct {
	Code                 uint32   `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Count                uint32   `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Telemetry_Error) Descriptor

func (*Telemetry_Error) Descriptor() ([]byte, []int)

func (*Telemetry_Error) GetCode

func (m *Telemetry_Error) GetCode() uint32

func (*Telemetry_Error) GetCount

func (m *Telemetry_Error) GetCount() uint32

func (*Telemetry_Error) GetMessage

func (m *Telemetry_Error) GetMessage() string

func (*Telemetry_Error) ProtoMessage

func (*Telemetry_Error) ProtoMessage()

func (*Telemetry_Error) Reset

func (m *Telemetry_Error) Reset()

func (*Telemetry_Error) String

func (m *Telemetry_Error) String() string

func (*Telemetry_Error) XXX_DiscardUnknown

func (m *Telemetry_Error) XXX_DiscardUnknown()

func (*Telemetry_Error) XXX_Marshal

func (m *Telemetry_Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Telemetry_Error) XXX_Merge

func (dst *Telemetry_Error) XXX_Merge(src proto.Message)

func (*Telemetry_Error) XXX_Size

func (m *Telemetry_Error) XXX_Size() int

func (*Telemetry_Error) XXX_Unmarshal

func (m *Telemetry_Error) XXX_Unmarshal(b []byte) error

type Telemetry_Money

type Telemetry_Money struct {
	TotalBills           uint32            `protobuf:"varint,1,opt,name=total_bills,json=totalBills,proto3" json:"total_bills,omitempty"`
	TotalCoins           uint32            `protobuf:"varint,2,opt,name=total_coins,json=totalCoins,proto3" json:"total_coins,omitempty"`
	Bills                map[uint32]uint32 `` /* 153-byte string literal not displayed */
	Coins                map[uint32]uint32 `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Telemetry_Money) Descriptor

func (*Telemetry_Money) Descriptor() ([]byte, []int)

func (*Telemetry_Money) GetBills

func (m *Telemetry_Money) GetBills() map[uint32]uint32

func (*Telemetry_Money) GetCoins

func (m *Telemetry_Money) GetCoins() map[uint32]uint32

func (*Telemetry_Money) GetTotalBills

func (m *Telemetry_Money) GetTotalBills() uint32

func (*Telemetry_Money) GetTotalCoins

func (m *Telemetry_Money) GetTotalCoins() uint32

func (*Telemetry_Money) ProtoMessage

func (*Telemetry_Money) ProtoMessage()

func (*Telemetry_Money) Reset

func (m *Telemetry_Money) Reset()

func (*Telemetry_Money) String

func (m *Telemetry_Money) String() string

func (*Telemetry_Money) XXX_DiscardUnknown

func (m *Telemetry_Money) XXX_DiscardUnknown()

func (*Telemetry_Money) XXX_Marshal

func (m *Telemetry_Money) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Telemetry_Money) XXX_Merge

func (dst *Telemetry_Money) XXX_Merge(src proto.Message)

func (*Telemetry_Money) XXX_Size

func (m *Telemetry_Money) XXX_Size() int

func (*Telemetry_Money) XXX_Unmarshal

func (m *Telemetry_Money) XXX_Unmarshal(b []byte) error

type Telemetry_Stat

type Telemetry_Stat struct {
	Activity             uint32            `protobuf:"varint,1,opt,name=activity,proto3" json:"activity,omitempty"`
	BillRejected         map[uint32]uint32 `` /* 188-byte string literal not displayed */
	CoinRejected         map[uint32]uint32 `` /* 188-byte string literal not displayed */
	CoinSlug             uint32            `protobuf:"varint,18,opt,name=coin_slug,json=coinSlug,proto3" json:"coin_slug,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Telemetry_Stat) Descriptor

func (*Telemetry_Stat) Descriptor() ([]byte, []int)

func (*Telemetry_Stat) GetActivity

func (m *Telemetry_Stat) GetActivity() uint32

func (*Telemetry_Stat) GetBillRejected

func (m *Telemetry_Stat) GetBillRejected() map[uint32]uint32

func (*Telemetry_Stat) GetCoinRejected

func (m *Telemetry_Stat) GetCoinRejected() map[uint32]uint32

func (*Telemetry_Stat) GetCoinSlug

func (m *Telemetry_Stat) GetCoinSlug() uint32

func (*Telemetry_Stat) ProtoMessage

func (*Telemetry_Stat) ProtoMessage()

func (*Telemetry_Stat) Reset

func (m *Telemetry_Stat) Reset()

func (*Telemetry_Stat) String

func (m *Telemetry_Stat) String() string

func (*Telemetry_Stat) XXX_DiscardUnknown

func (m *Telemetry_Stat) XXX_DiscardUnknown()

func (*Telemetry_Stat) XXX_Marshal

func (m *Telemetry_Stat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Telemetry_Stat) XXX_Merge

func (dst *Telemetry_Stat) XXX_Merge(src proto.Message)

func (*Telemetry_Stat) XXX_Size

func (m *Telemetry_Stat) XXX_Size() int

func (*Telemetry_Stat) XXX_Unmarshal

func (m *Telemetry_Stat) XXX_Unmarshal(b []byte) error

type Telemetry_Transaction

type Telemetry_Transaction struct {
	Code                 string        `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Options              []int32       `protobuf:"varint,2,rep,packed,name=options,proto3" json:"options,omitempty"`
	Price                uint32        `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"`
	PaymentMethod        PaymentMethod `protobuf:"varint,4,opt,name=payment_method,json=paymentMethod,proto3,enum=tele.PaymentMethod" json:"payment_method,omitempty"`
	CreditBills          uint32        `protobuf:"varint,5,opt,name=credit_bills,json=creditBills,proto3" json:"credit_bills,omitempty"`
	CreditCoins          uint32        `protobuf:"varint,6,opt,name=credit_coins,json=creditCoins,proto3" json:"credit_coins,omitempty"`
	Spent                *Inventory    `protobuf:"bytes,7,opt,name=spent,proto3" json:"spent,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*Telemetry_Transaction) Descriptor

func (*Telemetry_Transaction) Descriptor() ([]byte, []int)

func (*Telemetry_Transaction) GetCode

func (m *Telemetry_Transaction) GetCode() string

func (*Telemetry_Transaction) GetCreditBills

func (m *Telemetry_Transaction) GetCreditBills() uint32

func (*Telemetry_Transaction) GetCreditCoins

func (m *Telemetry_Transaction) GetCreditCoins() uint32

func (*Telemetry_Transaction) GetOptions

func (m *Telemetry_Transaction) GetOptions() []int32

func (*Telemetry_Transaction) GetPaymentMethod

func (m *Telemetry_Transaction) GetPaymentMethod() PaymentMethod

func (*Telemetry_Transaction) GetPrice

func (m *Telemetry_Transaction) GetPrice() uint32

func (*Telemetry_Transaction) GetSpent

func (m *Telemetry_Transaction) GetSpent() *Inventory

func (*Telemetry_Transaction) ProtoMessage

func (*Telemetry_Transaction) ProtoMessage()

func (*Telemetry_Transaction) Reset

func (m *Telemetry_Transaction) Reset()

func (*Telemetry_Transaction) String

func (m *Telemetry_Transaction) String() string

func (*Telemetry_Transaction) XXX_DiscardUnknown

func (m *Telemetry_Transaction) XXX_DiscardUnknown()

func (*Telemetry_Transaction) XXX_Marshal

func (m *Telemetry_Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Telemetry_Transaction) XXX_Merge

func (dst *Telemetry_Transaction) XXX_Merge(src proto.Message)

func (*Telemetry_Transaction) XXX_Size

func (m *Telemetry_Transaction) XXX_Size() int

func (*Telemetry_Transaction) XXX_Unmarshal

func (m *Telemetry_Transaction) XXX_Unmarshal(b []byte) error

type Teler

type Teler interface {
	Init(context.Context, *log2.Log, tele_config.Config) error
	Close()
	State(State)
	Error(error)
	StatModify(func(*Stat))
	Report(ctx context.Context, serviceTag bool) error
	Transaction(*Telemetry_Transaction)
}

Telemetry client, vending machine side. Not for external public usage.

func NewStub

func NewStub() Teler

Directories

Path Synopsis
Telemetry client config, vending machine side.
Telemetry client config, vending machine side.

Jump to

Keyboard shortcuts

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