consul

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a type that represents a Consul client

func NewClient

func NewClient(address string, log logr.Logger) (*Client, error)

NewClient is a function that returns a new Client

func (*Client) Create

func (c *Client) Create(service *generic.Service) (string, error)

Create is a method that creates a Consul service It returns the service's ID or an error The ID is a hash of the service's URL|Endpoint

func (*Client) Delete

func (c *Client) Delete(ID string) error

Delete is a method that deletes a Consul service It uses the service's ID to identify the service

func (*Client) Get

func (c *Client) Get(ID string) (*generic.Service, error)

Get is a method that retrieves a Consul service It uses the service's ID to identify the service

func (*Client) List

func (c *Client) List(filter string) (map[string]*generic.Service, error)

List is a method that returns a filtered list of Consul services It returns a map comprising service ID and generic.Service The ID is a hash of the service's URL|Endpoint

Jump to

Keyboard shortcuts

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