consul

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKVWebURL

func GenerateKVWebURL(uiBaseAddress, key string) string

Types

type Client

type Client interface {
	List(prefix string) (c.KVPairs, error)
	GetSchemeType() string
	GetConsulAddr() string
	GetConsulUIBaseAddr() (string, error)
	GetCurrentDatacenter() (string, error)
	ListDatacenters() ([]string, error)
}

func NewClient

func NewClient(address string, datacenter string) (Client, error)

type ConsulClient

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

func (*ConsulClient) GetConsulAddr

func (client *ConsulClient) GetConsulAddr() string

func (*ConsulClient) GetConsulUIBaseAddr

func (client *ConsulClient) GetConsulUIBaseAddr() (string, error)

func (*ConsulClient) GetCurrentDatacenter

func (client *ConsulClient) GetCurrentDatacenter() (string, error)

func (*ConsulClient) GetSchemeType

func (client *ConsulClient) GetSchemeType() string

http or https scheme type

func (*ConsulClient) List

func (client *ConsulClient) List(prefix string) (c.KVPairs, error)

func (*ConsulClient) ListDatacenters

func (client *ConsulClient) ListDatacenters() ([]string, error)

Jump to

Keyboard shortcuts

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