triton

package
v1.5.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: MIT Imports: 9 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled         bool          `toml:"enabled" override:"enabled"`
	ID              string        `toml:"id" override:"id"`
	Account         string        `toml:"account" override:"account"`
	DNSSuffix       string        `toml:"dns-suffix" override:"dns-suffix"`
	Endpoint        string        `toml:"endpoint" override:"endpoint"`
	Port            int           `toml:"port" override:"port"`
	RefreshInterval toml.Duration `toml:"refresh-interval" override:"refresh-interval"`
	Version         int           `toml:"version" override:"version"`
	// Path to CA file
	SSLCA string `toml:"ssl-ca" override:"ssl-ca"`
	// Path to host cert file
	SSLCert string `toml:"ssl-cert" override:"ssl-cert"`
	// Path to cert key file
	SSLKey string `toml:"ssl-key" override:"ssl-key"`
	// SSLServerName is used to verify the hostname for the targets.
	SSLServerName string `toml:"ssl-server-name" override:"ssl-server-name"`
	// Use SSL but skip chain & host verification
	InsecureSkipVerify bool `toml:"insecure-skip-verify" override:"insecure-skip-verify"`
}

Config is a Triton service discovery configuration

func (*Config) Init

func (t *Config) Init()

Init adds default values to Triton configuration

func (Config) Prom

func (t Config) Prom(c *config.ScrapeConfig)

Prom creates a prometheus configuration for Triton

func (Config) PromConfig

func (t Config) PromConfig() *config.TritonSDConfig

PromConfig returns the prometheus configuration for this discoverer

func (Config) Service

func (t Config) Service() string

Service return discoverer type

func (Config) ServiceID

func (t Config) ServiceID() string

ServiceID returns the discoverers name

func (Config) Validate

func (t Config) Validate() error

Validate validates Triton configuration values

type Diagnostic added in v1.4.0

type Diagnostic scraper.Diagnostic

type Service

type Service struct {
	Configs []Config
	// contains filtered or unexported fields
}

Service is the triton discovery service

func NewService

func NewService(c []Config, r scraper.Registry, d Diagnostic) *Service

NewService creates a new unopened service

func (*Service) Close

func (s *Service) Close() error

Close stops the service

func (*Service) Open

func (s *Service) Open() error

Open starts the service

func (*Service) Test

func (s *Service) Test(options interface{}) error

Test a service with the provided options.

func (*Service) TestOptions

func (s *Service) TestOptions() interface{}

TestOptions returns an object that is in turn passed to Test.

func (*Service) Update

func (s *Service) Update(newConfigs []interface{}) error

Update updates configuration while running

Jump to

Keyboard shortcuts

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