Documentation ¶
Index ¶
- Variables
- func ClientID(clientID string) registry.Option
- func ClusterID(clusterID string) registry.Option
- func NewNATSRegistry(local registry.Registry, opts ...registry.Option) registry.Registry
- func NewRegistry(local registry.Registry, opts ...registry.Option) registry.Registry
- func Options(nopts ...stan.Option) registry.Option
- func QueryTopic(s string) registry.Option
- func Quorum(n int) registry.Option
- func WatchTopic(s string) registry.Option
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultQuorum = 0
)
Functions ¶
func NewNATSRegistry ¶
func NewRegistry ¶
NewRegistry returns an initialized in-memory registry
func QueryTopic ¶
QueryTopic allows to set a custom nats topic on which service registries query (survey) other services. All registries listen on this topic and then respond to the query message.
func WatchTopic ¶
WatchTopic allows to set a custom nats topic on which registries broadcast changes (e.g. when services are added, updated or removed). Since we don't have a central registry service, each service typically broadcasts in a determined frequency on this topic.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.