cluster

package
v3.0.0-rc3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultQuorum = 0
)

Functions

func ClientID

func ClientID(clientID string) registry.Option

ClientID specify client id to connect

func ClusterID

func ClusterID(clusterID string) registry.Option

ClusterID specify cluster id to connect

func NewNATSRegistry

func NewNATSRegistry(local registry.Registry, opts ...registry.Option) registry.Registry

func NewRegistry

func NewRegistry(local registry.Registry, opts ...registry.Option) registry.Registry

NewRegistry returns an initialized in-memory registry

func Options

func Options(nopts ...stan.Option) registry.Option

Options allow to inject a nats.Options struct for configuring the nats connection

func QueryTopic

func QueryTopic(s string) registry.Option

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 Quorum

func Quorum(n int) registry.Option

func WatchTopic

func WatchTopic(s string) registry.Option

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL