consulpkg

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conf *Config, opts ...Option) (*api.Client, error)

NewClient ...

func NewConsulClient

func NewConsulClient(conf *Config, opts ...Option) (*api.Client, error)

NewConsulClient .

Types

type Config

type Config struct {
	Scheme             string
	Address            string
	PathPrefix         string
	Datacenter         string
	WaitTime           *durationpb.Duration
	Token              string
	Namespace          string
	Partition          string
	WithHttpBasicAuth  bool
	AuthUsername       string
	AuthPassword       string
	InsecureSkipVerify bool
	TlsAddress         string
	TlsCaPem           string
	TlsCertPem         string
	TlsKeyPem          string
}

Config consul config

type Option

type Option func(*options)

Option is config option.

func WithWriter

func WithWriter(writer io.Writer) Option

WithWriter with config writer.

Jump to

Keyboard shortcuts

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