client

package
Version: v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consul

type Consul struct {
	// contains filtered or unexported fields
}

Consul implements a simple client to the consul HTTP api.

func NewConsul

func NewConsul(urls []string, options ...value.Option) (*Consul, error)

NewConsul returns a new consul client.

func (*Consul) Deregister

func (c *Consul) Deregister(id string) error

Deregister removes the service with the provided id from the consul catalog.

func (*Consul) Register

func (c *Consul) Register(name string, endpoint value.Endpoint) (string, error)

Register adds a service with the provided name and endpoint at the consul agent.

func (*Consul) Service

func (c *Consul) Service(name string) (value.Endpoints, error)

Service fetches all endpoints for the provided service name from the consul catalog.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL