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 ¶
var (
	DefaultQuorum = 0
)
    Functions ¶
func ClientID ¶
ClientID specify client id to connect
func ClusterID ¶
ClusterID specify cluster id to connect
func NewNATSRegistry ¶
func NewRegistry ¶
NewRegistry returns an initialized in-memory registry
func Options ¶
Options allow to inject a nats.Options struct for configuring the nats connection
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.
      
      Source Files
      ¶
    
- cluster.go
 - helper.go
 - nats.go
 - options.go
 - watcher.go