consul

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const Namespace = "github_com/letgoapp/krakend-consul"

Namespace is the key to use to store and access the custom config data

Variables

View Source
var (
	// ErrNoConfig is the error to be returned when there is no config with the consul namespace
	ErrNoConfig = fmt.Errorf("unable to create the consul client: no config")
	// ErrBadConfig is the error to be returned when the config is not well defined
	ErrBadConfig = fmt.Errorf("unable to create the consul client with the received config")
	// ErrNoMachines is the error to be returned when the config has not defined one or more servers
	ErrNoMachines = fmt.Errorf("unable to create the consul client without a set of servers")
)

Functions

func Register

func Register(ctx context.Context, e config.ExtraConfig, port int, serviceName string, logger logging.Logger) error

Types

type Config

type Config struct {
	Address, Name string
	Port          int
	Tags          []string
}

Jump to

Keyboard shortcuts

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