Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAlreadyInitialized is used when attempting to re-initialize the discovery provider ErrAlreadyInitialized = errors.New("provider already initialized") // ErrNotInitialized is used when the provider is not initialized ErrNotInitialized = errors.New("provider not initialized") // ErrAlreadyRegistered is used when attempting to re-register the provider ErrAlreadyRegistered = errors.New("provider already registered") // ErrNotRegistered is used when attempting to de-register the provider ErrNotRegistered = errors.New("provider is not registered") // ErrInvalidConfig is used when the discovery provider configuration is invalid ErrInvalidConfig = errors.New("invalid discovery provider configuration") )
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { // Name specifies the discovered node's Name Name string // Host specifies the discovered node's Host Host string // DiscoveryPort DiscoveryPort int // PeersPort PeersPort int // RemotingPort RemotingPort int }
Node represents a discovered Node
func (*Node) DiscoveryAddress ¶ added in v2.6.2
DiscoveryAddress returns the node discovery address
func (*Node) PeersAddress ¶
PeersAddress returns address the node's peers will use to connect to
type Provider ¶
type Provider interface { // ID returns the service discovery provider name ID() string // Initialize initializes the service discovery provider. Initialize() error // Register registers the service discovery provider. Register() error // Deregister de-registers the service discovery provider. Deregister() error // DiscoverPeers returns a list discovered nodes' addresses. DiscoverPeers() ([]string, error) // Close closes the provider Close() error }
Provider helps discover other running actor system in a cloud environment
Click to show internal directories.
Click to hide internal directories.