Versions in this module Expand all Collapse all v1 v1.0.0 Jan 9, 2021 Changes in this version + const ADAPTOR + const DEBUG + const ERROR + const HUMORS_ERR + const INFO + const SERVANT + const WARN + var ErrorCode_name = map[int32]string + var ErrorCode_value = map[string]int32 + var File_humors_proto protoreflect.FileDescriptor + type ErrorCode int32 + const ErrorCode_CONNECTERR + const ErrorCode_DECODEERR + const ErrorCode_ENCODEERR + const ErrorCode_NOFUNCERR + const ErrorCode_NOSERVANTERR + const ErrorCode_SUCCESS + const ErrorCode_TIMEOUT + func (ErrorCode) Descriptor() protoreflect.EnumDescriptor + func (ErrorCode) EnumDescriptor() ([]byte, []int) + func (ErrorCode) Type() protoreflect.EnumType + func (x ErrorCode) Enum() *ErrorCode + func (x ErrorCode) Number() protoreflect.EnumNumber + func (x ErrorCode) String() string + type HumorAdaptor struct + func (a *HumorAdaptor) Call(clientID string, action int32, req proto.Message, res proto.Message) error + func (a *HumorAdaptor) CallTopic(topic string, action int32, req proto.Message, res proto.Message) error + func (a *HumorAdaptor) MessageHandler(_ MQTT.Client, message MQTT.Message) + type HumorServant struct + func (s *HumorServant) MessageHandler(_ MQTT.Client, message MQTT.Message) + func (s *HumorServant) RegisterFun(action int32, req interface{}, res interface{}, ...) + type Humors struct + Adaptor *HumorAdaptor + Servant *HumorServant + func NewHumors(opts *MQTT.ClientOptions) (*Humors, error) + func (h *Humors) InitAdaptor(timeout int32) + func (h *Humors) InitServant(topic string) + type RequestPacket struct + Action int32 + Payload []byte + ReqID int32 + ResTopic string + Timeout int32 + func (*RequestPacket) Descriptor() ([]byte, []int) + func (*RequestPacket) ProtoMessage() + func (x *RequestPacket) GetAction() int32 + func (x *RequestPacket) GetPayload() []byte + func (x *RequestPacket) GetReqID() int32 + func (x *RequestPacket) GetResTopic() string + func (x *RequestPacket) GetTimeout() int32 + func (x *RequestPacket) ProtoReflect() protoreflect.Message + func (x *RequestPacket) Reset() + func (x *RequestPacket) String() string + type ResponsePacket struct + Code ErrorCode + Payload []byte + ReqID int32 + func (*ResponsePacket) Descriptor() ([]byte, []int) + func (*ResponsePacket) ProtoMessage() + func (x *ResponsePacket) GetCode() ErrorCode + func (x *ResponsePacket) GetPayload() []byte + func (x *ResponsePacket) GetReqID() int32 + func (x *ResponsePacket) ProtoReflect() protoreflect.Message + func (x *ResponsePacket) Reset() + func (x *ResponsePacket) String() string