Documentation ¶
Index ¶
- type GoroutinePoolGoOpt
- type Observer
- type Option
- type ReconnectFunc
- type Subscriber
- func (s *Subscriber) AddCloseFunc(f func())
- func (s *Subscriber) AddReconnectFunc(f func()) uint64
- func (s *Subscriber) Close()
- func (s *Subscriber) Conn() *nats.Conn
- func (s *Subscriber) RemoveReconnectFunc(id uint64)
- func (s *Subscriber) Subscribe(ctx context.Context, subscriptionID string, topics []string, ...) (eventbus.Observer, error)
- type UnmarshalerFunc
- type UnmarshalerOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoroutinePoolGoOpt ¶
type GoroutinePoolGoOpt struct {
// contains filtered or unexported fields
}
func WithGoPool ¶
func WithGoPool(goroutinePoolGo eventbus.GoroutinePoolGoFunc) GoroutinePoolGoOpt
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer handles events from nats
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber implements a eventbus.Subscriber interface.
func New ¶
func New(conn *nats.Conn, pendingLimits natsClient.PendingLimitsConfig, logger log.Logger, opts ...Option) (*Subscriber, error)
Create publisher with existing NATS connection and proto marshaller
func (*Subscriber) AddCloseFunc ¶
func (s *Subscriber) AddCloseFunc(f func())
func (*Subscriber) AddReconnectFunc ¶
func (s *Subscriber) AddReconnectFunc(f func()) uint64
func (*Subscriber) Close ¶
func (s *Subscriber) Close()
func (*Subscriber) Conn ¶
func (s *Subscriber) Conn() *nats.Conn
func (*Subscriber) RemoveReconnectFunc ¶
func (s *Subscriber) RemoveReconnectFunc(id uint64)
type UnmarshalerFunc ¶
UnmarshalerFunc unmarshal bytes to pointer of struct.
type UnmarshalerOpt ¶
type UnmarshalerOpt struct {
// contains filtered or unexported fields
}
func WithUnmarshaler ¶
func WithUnmarshaler(dataUnmarshaler UnmarshalerFunc) UnmarshalerOpt
Click to show internal directories.
Click to hide internal directories.