consul_client

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: MIT Imports: 4 Imported by: 0

README

consul-client

simple consul client to interact with service discovery in consul

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckFunc

type CheckFunc func() (bool, error)

type Wrapper

type Wrapper struct {
	Client      *api.Client
	ServiceName string
}

func NewClientWrapper

func NewClientWrapper(name string, config *api.Config) (*Wrapper, error)

func (*Wrapper) AddServiceCheck

func (w *Wrapper) AddServiceCheck(name string, ttl time.Duration, notes string, checkFunc CheckFunc) error

func (*Wrapper) DeregisterService

func (w *Wrapper) DeregisterService() error

func (*Wrapper) RegisterService

func (w *Wrapper) RegisterService(ttl time.Duration) error

Jump to

Keyboard shortcuts

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