Versions in this module Expand all Collapse all v0 v0.1.2 Aug 7, 2023 v0.1.1 Jun 12, 2023 v0.1.0 Jun 12, 2023 Changes in this version + const AcceptEncoding + const Authorization + const Connection + const ContentLength + const ContentType + const Host + const SessionId + const TransferEncoding type Broker + PublishRaw func(topic string, msg []byte, opts ...PublishOption) error type Event + Raw func() []byte v0.0.7 May 26, 2023 v0.0.6 May 23, 2023 Changes in this version + const Failed + const Identifier + type CommonReply struct + Msg string + Status int32 + func (*CommonReply) Descriptor() ([]byte, []int) + func (*CommonReply) ProtoMessage() + func (x *CommonReply) GetMsg() string + func (x *CommonReply) GetStatus() int32 + func (x *CommonReply) ProtoReflect() protoreflect.Message + func (x *CommonReply) Reset() + func (x *CommonReply) String() string v0.0.5 May 22, 2023 Changes in this version type Event + Data func() Any v0.0.4 May 22, 2023 Changes in this version type Message + Data *anypb.Any + func (*Message) Descriptor() ([]byte, []int) + func (*Message) ProtoMessage() + func (x *Message) GetData() *anypb.Any + func (x *Message) ProtoReflect() protoreflect.Message + func (x *Message) Reset() + func (x *Message) String() string v0.0.3 May 21, 2023 v0.0.2 May 20, 2023 Changes in this version + const ContextCodec + const MaggageToken + const MeggageTo + const MessageAct + const MessageFrom + const MessageId + const TimeStampFrom + const TimeStampTo + var DefaultCodec encoding.Codec = nil + var File_broker_proto protoreflect.FileDescriptor + func Marshal(codec encoding.Codec, msg Any) ([]byte, error) + func Unmarshal(codec encoding.Codec, inputData []byte, outValue interface{}) error + type Any interface + type Binder func() Any + type Broker interface + Address func() string + Connect func() error + ConnectRetry func() error + Disconnect func() error + Init func(...Option) error + Name func() string + Options func() Options + Publish func(topic string, msg Any, opts ...PublishOption) error + PublishReq func(topic string, msg Any, opts ...PublishOption) error + PublishUpload func(topic string, msg Any, opts ...PublishOption) error + Subscribe func(topic string, handler Handler, binder Binder, opts ...SubscribeOption) (Subscriber, error) + SubscribeReq func(topic string, handler Handler, binder Binder, opts ...SubscribeOption) (Subscriber, error) + SubscribeResp func(topic string, handler Handler, binder Binder, opts ...SubscribeOption) (Subscriber, error) + SubscribeUpload func(topic string, handler Handler, binder Binder, opts ...SubscribeOption) (Subscriber, error) + type EncodeErrorFunc func(error) RespEvent + type Event interface + Ack func() error + Error func() error + Message func() *Message + Topic func() string + type Handler func(context.Context, Event) (RespEvent, error) + type Headers struct + Headers map[string]string + TimeFrom int64 + TimeTo int64 + func (*Headers) Descriptor() ([]byte, []int) + func (*Headers) ProtoMessage() + func (x *Headers) GetHeaders() map[string]string + func (x *Headers) GetTimeFrom() int64 + func (x *Headers) GetTimeTo() int64 + func (x *Headers) ProtoReflect() protoreflect.Message + func (x *Headers) Reset() + func (x *Headers) String() string + type Message struct + Body Any + Headers Headers + func (m Message) GetBody() Any + func (m Message) GetHeader(key string) string + func (m Message) GetHeaders() Headers + func (m Message) Topic() string + type Option func(*Options) + func OptionContextWithValue(k, v interface{}) Option + func WithAddress(addressList ...string) Option + func WithClientId(clientId string) Option + func WithCodec(name string) Option + func WithDisconnect(f func()) Option + func WithEnableSecure(enable bool) Option + func WithErrorHandler(handler Handler) Option + func WithGlobalPropagator() Option + func WithGlobalTracerProvider() Option + func WithLogger(logger log.Logger) Option + func WithOnConnect(f func()) Option + func WithOptionContext(ctx context.Context) Option + func WithPropagator(propagators propagation.TextMapPropagator) Option + func WithTLSConfig(config *tls.Config) Option + func WithTracerProvider(provider trace.TracerProvider, tracerName string) Option + type Options struct + Addrs []string + ClientId string + Codec encoding.Codec + Context context.Context + Disconncet func() + ErrorHandler Handler + FromTo bool + Log *log.Helper + OnConnect func() + Secure bool + TLSConfig *tls.Config + Tracings []tracing.Option + func NewOptions() Options + func NewOptionsAndApply(opts ...Option) Options + func (o *Options) Apply(opts ...Option) + func (o *Options) Logger() *log.Helper + type PublishOption func(*PublishOptions) + func PublishContextWithValue(k, v interface{}) PublishOption + func WithPublishContext(ctx context.Context) PublishOption + type PublishOptions struct + Context context.Context + func NewPublishOptions(opts ...PublishOption) PublishOptions + func (o *PublishOptions) Apply(opts ...PublishOption) + type RespEvent interface + GetBody func() Any + type SubscribeOption func(*SubscribeOptions) + func DisableAutoAck() SubscribeOption + func SubscribeContextWithValue(k, v interface{}) SubscribeOption + func WithQueueName(name string) SubscribeOption + func WithSubscribAct(Act int) SubscribeOption + func WithSubscribeContext(ctx context.Context) SubscribeOption + type SubscribeOptions struct + Act int + AutoAck bool + Context context.Context + Queue string + func NewSubscribeOptions(opts ...SubscribeOption) SubscribeOptions + func (o *SubscribeOptions) Apply(opts ...SubscribeOption) + type Subscriber interface + Options func() SubscribeOptions + Topic func() string + Unsubscribe func() error