nomad

package
v0.0.0-...-7688397 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultSDConfig = SDConfig{
		UpdateInterval:       model.Duration(1 * time.Second),
		EventStreamMaxErrors: 5,
		HTTPClientConfig:     config.DefaultHTTPClientConfig,
	}
)

Functions

This section is empty.

Types

type Discovery

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

func NewDiscovery

func NewDiscovery(conf *SDConfig, logger log.Logger) (*Discovery, error)

func (*Discovery) Run

func (d *Discovery) Run(ctx context.Context, ch chan<- []*targetgroup.Group)

type SDConfig

type SDConfig struct {
	Server               string                  `yaml:"server,omitempty"`
	Region               string                  `yaml:"region,omitempty"`
	Namespace            string                  `yaml:"namespace,omitempty"`
	SecretID             config.Secret           `yaml:"secret_id,omitempty"`
	UpdateInterval       model.Duration          `yaml:"update_interval,omitempty"`
	EventStreamMaxErrors int                     `yaml:"event_stream_max_errors,omitempty"`
	HTTPClientConfig     config.HTTPClientConfig `yaml:",inline"`
}

func (*SDConfig) Name

func (*SDConfig) Name() string

func (*SDConfig) NewDiscoverer

func (c *SDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)

func (*SDConfig) SetDirectory

func (c *SDConfig) SetDirectory(dir string)

func (*SDConfig) UnmarshalYAML

func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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