Documentation ¶
Overview ¶
protcol package provides packages with various communication protocols support that fulfils Protocol interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol interface { Decode(data []byte) ([]Transaction, error) Encode(txs []Transaction) ([]byte, error) Trigger(cmdName string) Transaction }
type Transaction ¶
type Transaction struct { Typ TransactionType CommandName string Payload map[string]any }
type TransactionType ¶
type TransactionType int
const ( TxUnknown TransactionType = iota TxGetParam TxSetParam TxMismatch )
func (TransactionType) String ¶
func (t TransactionType) String() string
Click to show internal directories.
Click to hide internal directories.