Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAgentExists = fmt.Errorf("Agent already exists")
)
Functions ¶
This section is empty.
Types ¶
type AgentOption ¶
type AgentOption func(*SubscriptionAgent)
func WithHandler ¶
func WithHandler(handler nats.MsgHandler) AgentOption
func WithSubjectFilter ¶
func WithSubjectFilter(subjects []string) AgentOption
type Option ¶
type Option func(*SubscriptionManager)
func WithJetStream ¶
func WithJetStream(js nats.JetStreamContext) Option
type SubOption ¶
type SubOption func(*Subscription)
func WithConsumer ¶
func WithDeliverTopic ¶
func WithPendingSize ¶
func WithStream ¶
func WithSubjects ¶
type Subscription ¶
type Subscription struct { Name string // contains filtered or unexported fields }
func NewSubscription ¶
func NewSubscription(name string, js nats.JetStreamContext, opts ...SubOption) *Subscription
func (*Subscription) Close ¶
func (sub *Subscription) Close() error
func (*Subscription) RemoveAgent ¶
func (sub *Subscription) RemoveAgent(agentName string) error
type SubscriptionAgent ¶
type SubscriptionAgent struct {
// contains filtered or unexported fields
}
func NewSubscriptionAgent ¶
func NewSubscriptionAgent(agentName string, js nats.JetStreamContext, s *nats.StreamInfo, c *nats.ConsumerInfo, opts ...AgentOption) *SubscriptionAgent
func (*SubscriptionAgent) Name ¶
func (sa *SubscriptionAgent) Name() string
type SubscriptionManager ¶
type SubscriptionManager struct {
// contains filtered or unexported fields
}
func NewSubscriptionManager ¶
func NewSubscriptionManager(opts ...Option) *SubscriptionManager
func (*SubscriptionManager) CreateSubscription ¶
func (sm *SubscriptionManager) CreateSubscription(name string, opts ...SubOption) (*Subscription, error)
func (*SubscriptionManager) RemoveSubscription ¶
func (sm *SubscriptionManager) RemoveSubscription(name string) error
Click to show internal directories.
Click to hide internal directories.