consul

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 5 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 NewConsulClient

func NewConsulClient(logger log.Logger, config *Config) (*Client, error)

func (*Client) AcquireLock added in v0.9.1

func (c *Client) AcquireLock(key string) error

func (*Client) Shutdown added in v0.9.1

func (c *Client) Shutdown()

type Config

type Config struct {
	Address     string
	Scheme      string
	SessionPath string
	Tags        []string

	Token     string
	TokenFile string

	Datacenter string
	Namespace  string

	Session *SessionConfig

	TLS api.TLSConfig
}

type Session

type Session struct {
	ID   string
	Name string
}

type SessionConfig added in v0.9.0

type SessionConfig struct {
	CheckInterval time.Duration
}

Jump to

Keyboard shortcuts

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