consul

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenKey = "X-Consul-Token" // nolint: gosec
)

Variables

View Source
var PrefixChannels map[string]chan bool

Functions

func NewConsulClient

func NewConsulClient(config types.ServiceConfig) (*consulClient, error)

NewConsulClient creates a new Consul Client. Service details are optional, not needed just for configuration, but required if registering

Types

type MockConsul

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

func NewMockConsul

func NewMockConsul() *MockConsul

func (*MockConsul) ClearExpectedAccessToken

func (mock *MockConsul) ClearExpectedAccessToken()

func (*MockConsul) Reset

func (mock *MockConsul) Reset()

func (*MockConsul) SetExpectedAccessToken

func (mock *MockConsul) SetExpectedAccessToken(token string)

func (*MockConsul) Start

func (mock *MockConsul) Start() *httptest.Server

Jump to

Keyboard shortcuts

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