rainbond: github.com/goodrain/rainbond/builder/parser/discovery Index | Files

package discovery

import "github.com/goodrain/rainbond/builder/parser/discovery"

Index

Package Files

discovery.go etcd.go

type Discoverier Uses

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

Discoverier blablabla

func NewDiscoverier Uses

func NewDiscoverier(info *Info) Discoverier

NewDiscoverier creates a new Discoverier

func NewEtcd Uses

func NewEtcd(info *Info) Discoverier

NewEtcd creates a new Discorvery which implemeted by etcd.

type Endpoint Uses

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

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

type Info Uses

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.

Package discovery imports 7 packages (graph) and is imported by 1 packages. Updated 2019-05-05. Refresh now. Tools for package owners.