Documentation ¶
Index ¶
- func CreateSearchGatewayResponse(ipAddress string, uuid []byte) []byte
- func DiscoverGateway(ip string) (uuid []byte, err error)
- func ReadBytes(conn net.Conn, size int) ([]byte, error)
- func SpanSetMessage(span opentracing.Span, message Message)
- type BroadcastListener
- type Message
- func (m Message) CreateCustomResponse(span opentracing.Span, operationType proto.GatewayOperation_OperationType, ...) []byte
- func (m Message) CreateResponse(span opentracing.Span, status proto.GatewayOperation_GatewayResult) []byte
- func (m Message) DecodePDO() RpdoTypeConverter
- func (m Message) Encode() []byte
- func (m Message) String() string
- type OperationType
- type RpdoType0
- type RpdoType1
- type RpdoType2
- type RpdoType3
- type RpdoType6
- type RpdoTypeConverter
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSearchGatewayResponse ¶
take an IP address, and a MAC address to respond with and create search gateway response
func DiscoverGateway ¶
send a UDP packet to `ip` and expect a searchGatewayResponse with the uuid
func SpanSetMessage ¶
func SpanSetMessage(span opentracing.Span, message Message)
Types ¶
type BroadcastListener ¶
type BroadcastListener struct { ResponseIP string // contains filtered or unexported fields }
func NewBroadcastListener ¶
func NewBroadcastListener(myIP string, myUUID []byte) *BroadcastListener
func (*BroadcastListener) Run ¶
func (l *BroadcastListener) Run()
func (*BroadcastListener) Stop ¶
func (l *BroadcastListener) Stop()
type Message ¶
type Message struct { Src []byte Dst []byte Operation proto.GatewayOperation RawMessage []byte OperationType OperationType Span opentracing.Span }
func (Message) CreateCustomResponse ¶
func (m Message) CreateCustomResponse(span opentracing.Span, operationType proto.GatewayOperation_OperationType, operationTypeStruct OperationType) []byte
func (Message) CreateResponse ¶
func (m Message) CreateResponse(span opentracing.Span, status proto.GatewayOperation_GatewayResult) []byte
creates the correct response message as a byte slice, for the parent message
func (Message) DecodePDO ¶
func (m Message) DecodePDO() RpdoTypeConverter
type OperationType ¶
type OperationType interface { XXX_Unmarshal([]byte) error XXX_Marshal(b []byte, deterministic bool) ([]byte, error) }
func GetStructForType ¶
func GetStructForType(operationTypeString string) OperationType
takes the name for an operation type and finds the struct for it
type RpdoType0 ¶
type RpdoType0 struct {
// contains filtered or unexported fields
}
func (RpdoType0) GetDescription ¶
func (r RpdoType0) GetDescription() string
type RpdoType1 ¶
type RpdoType1 struct {
// contains filtered or unexported fields
}
func (RpdoType1) GetDescription ¶
func (r RpdoType1) GetDescription() string
type RpdoType2 ¶
type RpdoType2 struct {
// contains filtered or unexported fields
}
func (RpdoType2) GetDescription ¶
func (r RpdoType2) GetDescription() string
type RpdoType3 ¶
type RpdoType3 struct {
// contains filtered or unexported fields
}
func (RpdoType3) GetDescription ¶
func (r RpdoType3) GetDescription() string
type RpdoType6 ¶
type RpdoType6 struct {
// contains filtered or unexported fields
}
func (RpdoType6) GetDescription ¶
func (r RpdoType6) GetDescription() string
type RpdoTypeConverter ¶
func NewPpid ¶
func NewPpid(ppid uint32, data []byte) RpdoTypeConverter
type Session ¶
func NewSession ¶
Click to show internal directories.
Click to hide internal directories.