consul

package
v0.0.0-...-c8a8185 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 4 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
}

func NewClient

func NewClient(conf *Config) (*Client, error)

func (*Client) Consul

func (c *Client) Consul() *consulapi.Client

func (*Client) List

List lists kv pairs

type Config

type Config struct {
	Datacenter    string `yaml:"datacenter" json:"datacenter" mapstructure:"datacenter"`
	Address       string `yaml:"address" json:"address" mapstructure:"address"`
	Scheme        string `yaml:"scheme" json:"scheme" mapstructure:"scheme"`
	HttpAuth      string `yaml:"http_auth" json:"http_auth" mapstructure:"http_auth"`
	Token         string `yaml:"token" json:"token" mapstructure:"token"`
	CAFile        string `yaml:"ca_file" json:"ca_file" mapstructure:"ca_file"`
	CAPem         string `yaml:"ca_pem" json:"ca_pem" mapstructure:"ca_pem"`
	CertFile      string `yaml:"cert_file" json:"cert_file" mapstructure:"cert_file"`
	CertPEM       string `yaml:"cert_pem" json:"cert_pem" mapstructure:"cert_pem"`
	KeyFile       string `yaml:"key_file" json:"key_file" mapstructure:"key_file"`
	KeyPEM        string `yaml:"key_pem" json:"key_pem" mapstructure:"key_pem"`
	CAPath        string `yaml:"ca_path" json:"ca_path" mapstructure:"ca_path"`
	InsecureHttps bool   `yaml:"insecure_https" json:"insecure_https" mapstructure:"insecure_https"`
	Namespace     string `yaml:"namespace" json:"namespace" mapstructure:"namespace"`
}

func (*Config) Client

func (c *Config) Client() (*consulapi.Client, error)

Client returns a new client for accessing consul.

Jump to

Keyboard shortcuts

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