consul

package
v0.37.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	Server:          "localhost:8500",
	TagSeparator:    ",",
	Scheme:          "http",
	AllowStale:      true,
	RefreshInterval: 30 * time.Second,
}

Functions

func New

func New(opts component.Options, args Arguments) (*discovery.Component, error)

New returns a new instance of a discovery.consul component.

Types

type Arguments

type Arguments struct {
	Server       string            `river:"server,attr,optional"`
	Token        rivertypes.Secret `river:"token,attr,optional"`
	Datacenter   string            `river:"datacenter,attr,optional"`
	Namespace    string            `river:"namespace,attr,optional"`
	Partition    string            `river:"partition,attr,optional"`
	TagSeparator string            `river:"tag_separator,attr,optional"`
	Scheme       string            `river:"scheme,attr,optional"`
	Username     string            `river:"username,attr,optional"`
	Password     rivertypes.Secret `river:"password,attr,optional"`
	AllowStale   bool              `river:"allow_stale,attr,optional"`
	Services     []string          `river:"services,attr,optional"`
	ServiceTags  []string          `river:"tags,attr,optional"`
	NodeMeta     map[string]string `river:"node_meta,attr,optional"`

	RefreshInterval  time.Duration           `river:"refresh_interval,attr,optional"`
	HTTPClientConfig config.HTTPClientConfig `river:",squash"`
}

func (*Arguments) Convert

func (args *Arguments) Convert() *prom_discovery.SDConfig

func (*Arguments) SetToDefault added in v0.35.0

func (args *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

func (*Arguments) Validate added in v0.35.0

func (args *Arguments) Validate() error

Validate implements river.Validator.

Jump to

Keyboard shortcuts

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