Documentation ¶
Index ¶
Constants ¶
View Source
const (
ProviderName = "consul"
)
Variables ¶
This section is empty.
Functions ¶
func NewSubscriber ¶
func NewSubscriber(opts *subscribe.NewSubscriberOptions) (subscribe.Subscriber, error)
create a new subscriber
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(conf *ConsulConfig) (*Client, error)
type ConsulConfig ¶
type ConsulConfig struct { WatchType string `yaml:"watch_type" json:"watch_type" mapstructure:"watch_type"` Datacenter string `yaml:"datacenter" json:"datacenter" mapstructure:"datacenter"` Address string `yaml:"address" json:"address" mapstructure:"address"` Scheme string `yaml:"scheme" json:"scheme" mapstructure:"scheme"` HttpAuth string `yaml:"http_auth" json:"http_auth" mapstructure:"http_auth"` Token string `yaml:"token" json:"token" mapstructure:"token"` CAFile string `yaml:"ca_file" json:"ca_file" mapstructure:"ca_file"` CAPem string `yaml:"ca_pem" json:"ca_pem" mapstructure:"ca_pem"` CertFile string `yaml:"cert_file" json:"cert_file" mapstructure:"cert_file"` CertPEM string `yaml:"cert_pem" json:"cert_pem" mapstructure:"cert_pem"` KeyFile string `yaml:"key_file" json:"key_file" mapstructure:"key_file"` KeyPEM string `yaml:"key_pem" json:"key_pem" mapstructure:"key_pem"` CAPath string `yaml:"ca_path" json:"ca_path" mapstructure:"ca_path"` InsecureHttps bool `yaml:"insecure_https" json:"insecure_https" mapstructure:"insecure_https"` Namespace string `yaml:"namespace" json:"namespace" mapstructure:"namespace"` }
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber implements the subscriber interface for consul
func (*Subscriber) Connect ¶
func (s *Subscriber) Connect(ctx context.Context) (err error)
Connect connects to nats server
func (*Subscriber) Disconnect ¶
func (s *Subscriber) Disconnect(ctx context.Context) (err error)
Disconnect disconnect from nats server
func (*Subscriber) Subscribe ¶
func (s *Subscriber) Subscribe(ctx context.Context) (err error)
Subscribe to bundle updates
func (*Subscriber) Unsubscribe ¶
func (s *Subscriber) Unsubscribe(ctx context.Context) (err error)
unsubscribe from bundle updates
Click to show internal directories.
Click to hide internal directories.