Documentation ¶
Overview ¶
Package disconats contains Rafty Discoverers which leverage the use NATS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVDiscoverer ¶
type KVDiscoverer struct {
// contains filtered or unexported fields
}
KVDiscoverer is a Rafty discoverer which leverages the use of NATS JetStream key values. This discoverer will register itself upon calling Start() and deregister itself when terminated.
func NewKVDiscoverer ¶
func NewKVDiscoverer(advertisedAddr string, natsConn *nats.Conn, options ...KVOption) (*KVDiscoverer, error)
func (*KVDiscoverer) Done ¶
func (d *KVDiscoverer) Done() chan struct{}
func (*KVDiscoverer) GetServers ¶
func (d *KVDiscoverer) GetServers() []raft.Server
func (*KVDiscoverer) NewServers ¶
func (d *KVDiscoverer) NewServers() chan struct{}
func (*KVDiscoverer) Start ¶
func (d *KVDiscoverer) Start(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.