Documentation ¶
Index ¶
- Variables
- func Close(s *zmq4.Socket) error
- func Connect(ctx *zmq4.Context) (*zmq4.Socket, error)
- func Decode[T any](b []byte) (T, error)
- func Encode(v any) ([]byte, error)
- func EncodeRouteMessage[T any](rid byte, d T) ([]byte, error)
- func LogReplyError(err error)
- func NewContext() (*zmq4.Context, error)
- func RegisterHandlers(s *zmq4.Socket)
- func RegisterPub(s *zmq4.Socket)
- func Reply(s *zmq4.Socket, m ReplyMessage) error
- func ReplyNOK(s *zmq4.Socket) error
- func ReplyOK(s *zmq4.Socket) error
- func Send(s *zmq4.Socket, b []byte) (bool, error)
- func SendRawRouteMessage[T any](s *zmq4.Socket, rid byte, d T) ([]byte, error)
- func SendRouteMessage[T any](s *zmq4.Socket, rid byte, d T) (bool, error)
- func ServerAddress() string
- func Start(ctx *zmq4.Context) (*zmq4.Socket, error)
- type ReplyMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OK = []byte{0} NOK = []byte{1} ERROR = []byte{2} )
Functions ¶
func EncodeRouteMessage ¶
Nodes should use this function to encode messages to send to central-server.
func LogReplyError ¶
func LogReplyError(err error)
func NewContext ¶
func RegisterHandlers ¶
func RegisterPub ¶
func SendRawRouteMessage ¶
func ServerAddress ¶
func ServerAddress() string
Types ¶
type ReplyMessage ¶
func EmptyReplyMessage ¶
func EmptyReplyMessage() ReplyMessage
func ErrorReplyMessage ¶
func ErrorReplyMessage(err error) ReplyMessage
func JSONReplyMessage ¶
func JSONReplyMessage(v any) ReplyMessage
func NotOkReplyMessage ¶
func NotOkReplyMessage() ReplyMessage
func OkReplyMessage ¶
func OkReplyMessage() ReplyMessage
Click to show internal directories.
Click to hide internal directories.