Documentation ¶
Index ¶
Constants ¶
View Source
const (
ProviderName = "nats"
)
Variables ¶
This section is empty.
Functions ¶
func NewSubscriber ¶
func NewSubscriber(opts *subscribe.NewSubscriberOptions) (subscribe.Subscriber, error)
NewSubscriber create a new subscriber
Types ¶
type Config ¶
type Config struct { Servers []string `yaml:"servers" json:"servers"` MaxReconnect int `yaml:"max_reconnect" json:"max_reconnect"` }
Config provides configuration information to nats client
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber implements the subscriber interface for nats
func (*Subscriber) Connect ¶
func (s *Subscriber) Connect(ctx context.Context) error
Connect connects to nats server
func (*Subscriber) Disconnect ¶
func (s *Subscriber) Disconnect(ctx context.Context) error
Disconnect disconnects from nats server
func (*Subscriber) Subscribe ¶
func (s *Subscriber) Subscribe(ctx context.Context) error
Subscribe subscribes to bundle updates
func (*Subscriber) Unsubscribe ¶
func (s *Subscriber) Unsubscribe(ctx context.Context) error
Unsubscribe unsubscribes from bundle updates
Click to show internal directories.
Click to hide internal directories.