Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServerAddrValidator ¶ added in v2.4.0
func NewServerAddrValidator(server string) validation.Validator
NewServerAddrValidator validates the nats server address
Types ¶
type Config ¶
type Config struct { // NatsServer defines the nats server in the format nats://host:port NatsServer string // NatsSubject defines the custom NATS subject NatsSubject string // The actor system name ActorSystemName string // ApplicationName specifies the running application ApplicationName string // Timeout defines the nodes discovery timeout Timeout time.Duration }
Config represents the nats provider discoConfig
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
Discovery represents the kubernetes discovery
func NewDiscovery ¶
NewDiscovery returns an instance of the kubernetes discovery provider
func (*Discovery) Deregister ¶
Deregister removes this node from a service discovery directory.
func (*Discovery) DiscoverPeers ¶
DiscoverPeers returns a list of known nodes.
func (*Discovery) Initialize ¶
Initialize initializes the plugin: registers some internal data structures, clients etc.
type Option ¶
type Option interface { // Apply sets the Option value of a config. Apply(disco *Discovery) }
Option is the interface that applies a configuration option.
type OptionFunc ¶
type OptionFunc func(disco *Discovery)
OptionFunc implements the Option interface.
func (OptionFunc) Apply ¶
func (f OptionFunc) Apply(disco *Discovery)
Apply applies the Cluster's option
type ServerAddrValidator ¶ added in v2.4.0
type ServerAddrValidator struct {
// contains filtered or unexported fields
}
ServerAddrValidator helps validates the NATs server address
func (*ServerAddrValidator) Validate ¶ added in v2.4.0
func (x *ServerAddrValidator) Validate() error
Validate execute the validation code