etcd

package
v0.0.0-...-53c8147 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultGrantTTL = 5
View Source
var DefaultPeerPublishInterval = 1 * time.Second

Functions

func ParseDSNURL

func ParseDSNURL(dsnURL *url.URL) (addr string, namespace string, err error)

Types

type Etcd

type Etcd struct {
	// contains filtered or unexported fields
}

func New

func New(dsnURL *url.URL) (*Etcd, error)

DNS example: `etcd://etcd.dmesh:2379/eos-dev1` DNS example: `etcd://<etcd-host>:<etcd-port>/<etcd-namespace>`

func (*Etcd) Close

func (d *Etcd) Close() error

func (*Etcd) Peers

func (d *Etcd) Peers() (out []*dmesh.SearchPeer)

func (*Etcd) PublishNow

func (d *Etcd) PublishNow(peer dmesh.Peer) error

func (*Etcd) PublishWithin

func (d *Etcd) PublishWithin(peer dmesh.Peer, timeout time.Duration)

publishWithin 5 minutes durationToNext = 10 years I was waiting for 10 years interrupted:

you're asking for 5 minutes?
that's shorter than 10 years!
let's make the durationToNextPublish = 5 minutes

PublishWithin(5 * time.Minute)

func (*Etcd) Start

func (d *Etcd) Start(ctx context.Context, watchServices []string) error

Jump to

Keyboard shortcuts

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