tele

package
v0.210925.4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: CC0-1.0 Imports: 7 Imported by: 0

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 CmdReplay_name = map[int32]string{
	0: "nothing",
	1: "accepted",
	2: "done",
	3: "busy",
	4: "error",
}
View Source
var CmdReplay_value = map[string]int32{
	"nothing":  0,
	"accepted": 1,
	"done":     2,
	"busy":     3,
	"error":    4,
}
View Source
var CookReplay_name = map[int32]string{
	0: "hz",
	1: "cookStart",
	2: "cookFinish",
	3: "cookInaccessible",
	4: "cookOverdraft",
	5: "cookError",
}
View Source
var CookReplay_value = map[string]int32{
	"hz":               0,
	"cookStart":        1,
	"cookFinish":       2,
	"cookInaccessible": 3,
	"cookOverdraft":    4,
	"cookError":        5,
}
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",
	8:  "TempProblem",
	9:  "Shutdown",
	10: "RemoteControl",
}
View Source
var State_value = map[string]int32{
	"Invalid":       0,
	"Boot":          1,
	"Nominal":       2,
	"Disconnected":  3,
	"Problem":       4,
	"Service":       5,
	"Lock":          6,
	"Client":        7,
	"TempProblem":   8,
	"Shutdown":      9,
	"RemoteControl": 10,
}

Functions

This section is empty.

Types

type CmdReplay

type CmdReplay int32
const (
	CmdReplay_nothing  CmdReplay = 0
	CmdReplay_accepted CmdReplay = 1
	CmdReplay_done     CmdReplay = 2
	CmdReplay_busy     CmdReplay = 3
	CmdReplay_error    CmdReplay = 4
)

func (CmdReplay) EnumDescriptor

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

func (CmdReplay) String

func (x CmdReplay) String() string

type Command

type Command struct {
	Executer uint64 `protobuf:"varint,5,opt,name=executer,proto3" json:"executer,omitempty"`
	Lock     bool   `protobuf:"varint,6,opt,name=lock,proto3" json:"lock,omitempty"`
	// Types that are valid to be assigned to Task:
	//	*Command_Report
	//	*Command_Exec
	//	*Command_SetInventory
	//	*Command_SetConfig
	//	*Command_Stop
	//	*Command_Show_QR
	//	*Command_ValidateCode
	//	*Command_Cook
	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) GetCook

func (m *Command) GetCook() *Command_ArgCook

func (*Command) GetExec

func (m *Command) GetExec() *Command_ArgExec

func (*Command) GetExecuter

func (m *Command) GetExecuter() uint64

func (*Command) GetLock

func (m *Command) GetLock() bool

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

func (m *Command) GetShow_QR() *Command_ArgShowQR

func (*Command) GetStop

func (m *Command) GetStop() *Command_ArgSendStatus

func (*Command) GetTask

func (m *Command) GetTask() isCommand_Task

func (*Command) GetValidateCode

func (m *Command) GetValidateCode() *Command_ArgValidateCode

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_ArgCook

type Command_ArgCook struct {
	Menucode             string        `protobuf:"bytes,1,opt,name=menucode,proto3" json:"menucode,omitempty"`
	Cream                []byte        `protobuf:"bytes,2,opt,name=cream,proto3" json:"cream,omitempty"`
	Sugar                []byte        `protobuf:"bytes,3,opt,name=sugar,proto3" json:"sugar,omitempty"`
	Balance              uint32        `protobuf:"varint,4,opt,name=balance,proto3" json:"balance,omitempty"`
	PaymentMethod        PaymentMethod `protobuf:"varint,5,opt,name=payment_method,json=paymentMethod,proto3,enum=tele.PaymentMethod" json:"payment_method,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*Command_ArgCook) Descriptor

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

func (*Command_ArgCook) GetBalance

func (m *Command_ArgCook) GetBalance() uint32

func (*Command_ArgCook) GetCream

func (m *Command_ArgCook) GetCream() []byte

func (*Command_ArgCook) GetMenucode

func (m *Command_ArgCook) GetMenucode() string

func (*Command_ArgCook) GetPaymentMethod

func (m *Command_ArgCook) GetPaymentMethod() PaymentMethod

func (*Command_ArgCook) GetSugar

func (m *Command_ArgCook) GetSugar() []byte

func (*Command_ArgCook) ProtoMessage

func (*Command_ArgCook) ProtoMessage()

func (*Command_ArgCook) Reset

func (m *Command_ArgCook) Reset()

func (*Command_ArgCook) String

func (m *Command_ArgCook) String() string

func (*Command_ArgCook) XXX_DiscardUnknown

func (m *Command_ArgCook) XXX_DiscardUnknown()

func (*Command_ArgCook) XXX_Marshal

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

func (*Command_ArgCook) XXX_Merge

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

func (*Command_ArgCook) XXX_Size

func (m *Command_ArgCook) XXX_Size() int

func (*Command_ArgCook) XXX_Unmarshal

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

type Command_ArgExec

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

message ArgLock { int32 duration = 1; }

func (*Command_ArgExec) Descriptor

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

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_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_ArgSendStatus

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

func (*Command_ArgSendStatus) Descriptor

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

func (*Command_ArgSendStatus) ProtoMessage

func (*Command_ArgSendStatus) ProtoMessage()

func (*Command_ArgSendStatus) Reset

func (m *Command_ArgSendStatus) Reset()

func (*Command_ArgSendStatus) String

func (m *Command_ArgSendStatus) String() string

func (*Command_ArgSendStatus) XXX_DiscardUnknown

func (m *Command_ArgSendStatus) XXX_DiscardUnknown()

func (*Command_ArgSendStatus) XXX_Marshal

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

func (*Command_ArgSendStatus) XXX_Merge

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

func (*Command_ArgSendStatus) XXX_Size

func (m *Command_ArgSendStatus) XXX_Size() int

func (*Command_ArgSendStatus) XXX_Unmarshal

func (m *Command_ArgSendStatus) 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

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

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

func (*Command_ArgShowQR) GetLayout

func (m *Command_ArgShowQR) GetLayout() string

func (*Command_ArgShowQR) GetQrText

func (m *Command_ArgShowQR) GetQrText() string

func (*Command_ArgShowQR) ProtoMessage

func (*Command_ArgShowQR) ProtoMessage()

func (*Command_ArgShowQR) Reset

func (m *Command_ArgShowQR) Reset()

func (*Command_ArgShowQR) String

func (m *Command_ArgShowQR) String() string

func (*Command_ArgShowQR) XXX_DiscardUnknown

func (m *Command_ArgShowQR) XXX_DiscardUnknown()

func (*Command_ArgShowQR) XXX_Marshal

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

func (*Command_ArgShowQR) XXX_Merge

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

func (*Command_ArgShowQR) XXX_Size

func (m *Command_ArgShowQR) XXX_Size() int

func (*Command_ArgShowQR) XXX_Unmarshal

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

type Command_ArgValidateCode

type Command_ArgValidateCode struct {
	Code                 string   `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Command_ArgValidateCode) Descriptor

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

func (*Command_ArgValidateCode) GetCode

func (m *Command_ArgValidateCode) GetCode() string

func (*Command_ArgValidateCode) ProtoMessage

func (*Command_ArgValidateCode) ProtoMessage()

func (*Command_ArgValidateCode) Reset

func (m *Command_ArgValidateCode) Reset()

func (*Command_ArgValidateCode) String

func (m *Command_ArgValidateCode) String() string

func (*Command_ArgValidateCode) XXX_DiscardUnknown

func (m *Command_ArgValidateCode) XXX_DiscardUnknown()

func (*Command_ArgValidateCode) XXX_Marshal

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

func (*Command_ArgValidateCode) XXX_Merge

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

func (*Command_ArgValidateCode) XXX_Size

func (m *Command_ArgValidateCode) XXX_Size() int

func (*Command_ArgValidateCode) XXX_Unmarshal

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

type Command_Cook

type Command_Cook struct {
	Cook *Command_ArgCook `protobuf:"bytes,24,opt,name=cook,proto3,oneof"`
}

type Command_Exec

type Command_Exec struct {
	Exec *Command_ArgExec `protobuf:"bytes,18,opt,name=exec,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

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_ArgSendStatus `protobuf:"bytes,21,opt,name=stop,proto3,oneof"`
}

type Command_ValidateCode

type Command_ValidateCode struct {
	ValidateCode *Command_ArgValidateCode `protobuf:"bytes,23,opt,name=validate_code,json=validateCode,proto3,oneof"`
}

type CookReplay

type CookReplay int32
const (
	CookReplay_hz               CookReplay = 0
	CookReplay_cookStart        CookReplay = 1
	CookReplay_cookFinish       CookReplay = 2
	CookReplay_cookInaccessible CookReplay = 3
	CookReplay_cookOverdraft    CookReplay = 4
	CookReplay_cookError        CookReplay = 5
)

func (CookReplay) EnumDescriptor

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

func (CookReplay) String

func (x CookReplay) String() string

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"`
	Executer             uint64     `protobuf:"varint,4,opt,name=executer,proto3" json:"executer,omitempty"`
	CmdReplay            CmdReplay  `protobuf:"varint,5,opt,name=cmd_replay,json=cmdReplay,proto3,enum=tele.CmdReplay" json:"cmd_replay,omitempty"`
	CookReplay           CookReplay `protobuf:"varint,6,opt,name=cook_replay,json=cookReplay,proto3,enum=tele.CookReplay" json:"cook_replay,omitempty"`
	ValidateReplay       uint32     `protobuf:"varint,7,opt,name=validateReplay,proto3" json:"validateReplay,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) GetCmdReplay

func (m *Response) GetCmdReplay() CmdReplay

func (*Response) GetCommandId

func (m *Response) GetCommandId() uint32

func (*Response) GetCookReplay

func (m *Response) GetCookReplay() CookReplay

func (*Response) GetData

func (m *Response) GetData() string

func (*Response) GetError

func (m *Response) GetError() string

func (*Response) GetExecuter

func (m *Response) GetExecuter() uint64

func (*Response) GetINTERNALTopic

func (m *Response) GetINTERNALTopic() string

func (*Response) GetValidateReplay

func (m *Response) GetValidateReplay() uint32

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
}

Stat struct 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()

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
	State_TempProblem   State = 8
	State_Shutdown      State = 9
	State_RemoteControl State = 10
)

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"`
	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) 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)
}

Teler interface 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