rainbond: github.com/goodrain/rainbond/worker/appm/thirdparty/discovery Index | Files

package discovery

import "github.com/goodrain/rainbond/worker/appm/thirdparty/discovery"


Package Files

discovery.go etcd.go

type Discoverier Uses

type Discoverier interface {
    Connect() error
    Close() error
    Fetch() ([]*v1.RbdEndpoint, error)

Discoverier is the interface that wraps the required methods to gather information about third-party service endpoints.

func NewDiscoverier Uses

func NewDiscoverier(cfg *model.ThirdPartySvcDiscoveryCfg,
    updateCh *channels.RingChannel,
    stopCh chan struct{}) (Discoverier, error)

NewDiscoverier creates a new Discoverier.

func NewEtcd Uses

func NewEtcd(cfg *model.ThirdPartySvcDiscoveryCfg,
    updateCh *channels.RingChannel,
    stopCh chan struct{}) Discoverier

NewEtcd creates a new Discorvery which implemeted by etcd.

type Event Uses

type Event struct {
    Type EventType
    Obj  interface{}

Event holds the context of an event.

type EventType Uses

type EventType string

EventType type of event

const (
    // CreateEvent event associated with new objects in a service discovery center
    CreateEvent EventType = "CREATE"
    // UpdateEvent event associated with an object update in a service discovery center
    UpdateEvent EventType = "UPDATE"
    // DeleteEvent event associated when an object is removed from a service discovery center
    DeleteEvent EventType = "DELETE"
    // UnhealthyEvent -
    UnhealthyEvent EventType = "UNHEALTHY"
    // HealthEvent -
    HealthEvent EventType = "HEALTH"

Package discovery imports 12 packages (graph) and is imported by 3 packages. Updated 2019-10-16. Refresh now. Tools for package owners.