etcd

package module
v0.0.0-...-e971c98 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2016 License: LGPL-3.0 Imports: 10 Imported by: 1

README

###Etcd

Is the etcd implementation for herald declare.

GoDoc

etcd

-- import "github.com/duckbunny/etcd"

Usage

var (

	// Where the ServiceKVPath resides
	KVpath string = "services"

	// Title for specifying herald in flags
	Title string = "etcd"
)
func FormattedKey
func FormattedKey(s *service.Service) string

FormattedKey returns correctly formatted key of the service

func Machines
func Machines() []string
func ProcessEtcdErrors
func ProcessEtcdErrors(err error) error
func Register
func Register()

Register this herald with consul

type Etcd
type Etcd struct {
	KeysAPI client.KeysAPI
}

Etcd structure stores the etcd clients KeysAPI

func New
func New() *Etcd

New returns a new Etcd struct

func (*Etcd) Declare
func (e *Etcd) Declare(s *service.Service) error

Declare the service per the Declare interface in Herald.

func (*Etcd) Get
func (e *Etcd) Get(s *service.Service) error

Get retrieves a service per the Declare interface in Herald

func (*Etcd) Init
func (e *Etcd) Init() error

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Where the ServiceKVPath resides
	KVServicesPath string = "services"

	// Title for specifying herald in flags
	Title string = "etcd"
)

Functions

func FormattedKey

func FormattedKey(s *service.Service) string

FormattedKey returns correctly formatted key of the service

func Machines

func Machines() []string

func ProcessEtcdErrors

func ProcessEtcdErrors(err error) error

func Register

func Register()

Register this herald with consul

Types

type Etcd

type Etcd struct {
	KeysAPI client.KeysAPI
}

Etcd structure stores the etcd clients KeysAPI

func New

func New() *Etcd

New returns a new Etcd struct

func (*Etcd) Declare

func (e *Etcd) Declare(s *service.Service) error

Declare the service per the Declare interface in Herald.

func (*Etcd) GetService

func (e *Etcd) GetService(s *service.Service) error

Get retrieves a service per the Declare interface in Herald

func (*Etcd) Init

func (e *Etcd) Init() error

Jump to

Keyboard shortcuts

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