adapter

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyConfig = errors.New("disco config tree is empty")

ErrEmptyConfig occurs when initialising a disco from an empty config tree

Functions

func Adapters

func Adapters() []string

Adapters returns the list of registered adapters

func New

func New(config config.Tree) (disco.Agent, error)

New creates a new service discovery agent

func Register

func Register(name string, adapter Adapter)

Register makes a registrar adapter available by the provided name. If an adapter is registered twice or if an adapter is nil, it will panic.

Types

type Adapter

type Adapter func(config.Tree) (disco.Agent, error)

Adapter returns a new agent initialised with the given config

Directories

Path Synopsis
Package consul is a wrapper around the Hashicorp Consul service discovery functionnality Consul is a highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and configuration easy.
Package consul is a wrapper around the Hashicorp Consul service discovery functionnality Consul is a highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and configuration easy.

Jump to

Keyboard shortcuts

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