etcd

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TTL      = 10
	INTERVAL = 5 * time.Second
)

Functions

func NewEtcd

func NewEtcd(rawURL string) (discovery.Driver, error)

Types

type Etcd

type Etcd struct {
	URL       *url.URL
	Conn      *grpc.ClientConn
	Heartbeat chan bool
}

func (*Etcd) Get

func (d *Etcd) Get(name string) (string, error)

func (*Etcd) Register

func (d *Etcd) Register(name string, protocol string, hostname string, port int) error

func (*Etcd) SendHeartbeat

func (d *Etcd) SendHeartbeat(f func())

type Service

type Service struct {
	UniqueId string
	Name     string
	Addr     string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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