consul

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: Apache-2.0 Imports: 9 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	Config *consulapi.Config
	// contains filtered or unexported fields
}

Adapter builds configuration and returns Consul Client

func (*Adapter) Deregister

func (c *Adapter) Deregister(service *consulapi.AgentServiceRegistration) error

Deregister deregisters a service in Consul

func (*Adapter) New

func (c *Adapter) New(cfg *config.Config, podNodeName string, podIP string) *Adapter

New returns the ConsulAdapter.

func (*Adapter) Register

func (c *Adapter) Register(service *consulapi.AgentServiceRegistration) error

Register registers new service in Consul

func (*Adapter) Services

func (c *Adapter) Services() (map[string]*consulapi.AgentService, error)

Services returns all services from a Consul Agent

Jump to

Keyboard shortcuts

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