consul

package
v1.1.36 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConsulAddress

func GetConsulAddress() string

func IsInsideDockerContainer

func IsInsideDockerContainer() bool

Types

type Client

type Client struct {
	*api.Client
	// contains filtered or unexported fields
}

func GetConsulClient

func GetConsulClient() *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) GetAddress

func (c *Client) GetAddress(service string) string

func (*Client) GetAddressWithTag

func (c *Client) GetAddressWithTag(service string, tag string) string

func (*Client) GetAllAddress

func (c *Client) GetAllAddress(service string) []string

func (*Client) GetAllAddressWithTag

func (c *Client) GetAllAddressWithTag(service string, tag string) []string

func (*Client) RegisterService

func (c *Client) RegisterService(serviceName string, address string) error

func (*Client) RegisterServiceWithTag

func (c *Client) RegisterServiceWithTag(serviceName string, address string, tag string) error

func (*Client) RegisterServiceWithTags

func (c *Client) RegisterServiceWithTags(serviceName string, address string, tags []string) error

type RegisteredService

type RegisteredService struct {
	ServiceID string
	CheckID   string
}

Jump to

Keyboard shortcuts

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