Documentation ¶
Index ¶
- type Subscriber
- type SubscriberBase
- func (s *SubscriberBase) AddTopic(topic Topic) (string, error)
- func (s *SubscriberBase) Construct(app app_context.Context, serializer ...message.Serializer)
- func (s *SubscriberBase) DeleteTopic(topicName string, subscriptionId ...string) bool
- func (s *SubscriberBase) Handle(ctx op_context.Context, topicName string, msg []byte) error
- func (s *SubscriberBase) NewOpContext(topicName string) op_context.Context
- func (s *SubscriberBase) Topics(topicName string) (map[string]Topic, error)
- type SubscriberClient
- type SubscriberClientBase
- type Topic
- type TopicBase
- type TopicT
- type WithSubscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subscriber ¶
type SubscriberBase ¶
type SubscriberBase struct { app_context.WithAppBase // contains filtered or unexported fields }
func (*SubscriberBase) Construct ¶
func (s *SubscriberBase) Construct(app app_context.Context, serializer ...message.Serializer)
func (*SubscriberBase) DeleteTopic ¶
func (s *SubscriberBase) DeleteTopic(topicName string, subscriptionId ...string) bool
func (*SubscriberBase) Handle ¶
func (s *SubscriberBase) Handle(ctx op_context.Context, topicName string, msg []byte) error
func (*SubscriberBase) NewOpContext ¶
func (s *SubscriberBase) NewOpContext(topicName string) op_context.Context
type SubscriberClient ¶
type SubscriberClient[T any] interface { Name() string Handle(ctx op_context.Context, msg T) error }
type SubscriberClientBase ¶
type SubscriberClientBase struct {
// contains filtered or unexported fields
}
func (*SubscriberClientBase) Init ¶
func (s *SubscriberClientBase) Init(name string)
func (*SubscriberClientBase) Name ¶
func (s *SubscriberClientBase) Name() string
type Topic ¶
type Topic interface { Name() string Handle(ctx op_context.Context, msg []byte, serializer message.Serializer) error Unsubscribe(id string) }
type TopicBase ¶
type TopicBase[T any] struct { // contains filtered or unexported fields }
func (*TopicBase[T]) Handle ¶
func (t *TopicBase[T]) Handle(ctx op_context.Context, msg []byte, serializer message.Serializer) error
func (*TopicBase[T]) Subscribe ¶
func (t *TopicBase[T]) Subscribe(subscriber SubscriberClient[T])
func (*TopicBase[T]) Unsubscribe ¶
type TopicT ¶
type TopicT[T any] interface { Topic Subscribe(subscriber SubscriberClient[T]) }
type WithSubscriber ¶
type WithSubscriber interface {
Subscriber() Subscriber
}
Click to show internal directories.
Click to hide internal directories.