discovery

package
v5.1.0-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discoverier

type Discoverier interface {
	Connect() error
	Fetch() ([]*Endpoint, error)
	Close() error
}

Discoverier blablabla

func NewDiscoverier

func NewDiscoverier(info *Info) Discoverier

NewDiscoverier creates a new Discoverier

func NewEtcd

func NewEtcd(info *Info) Discoverier

NewEtcd creates a new Discorvery which implemeted by etcd.

type Endpoint

type Endpoint struct {
	Ep       string `json:"endpoint"`
	IsOnline bool   `json:"is_online"`
}

Endpoint holds endpoint and endpoint status(online or offline).

type Info

type Info struct {
	Type     string   `json:"type"`
	Servers  []string `json:"servers"`
	Key      string   `json:"key"`
	Username string   `json:"username"`
	Password string   `json:"password"`
}

Info holds service discovery center information.

Jump to

Keyboard shortcuts

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