k8s

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster added in v1.3.0

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

func NewCluster added in v1.3.0

func NewCluster(c Config, l *log.Logger) (*Cluster, error)

func (*Cluster) Client added in v1.3.0

func (s *Cluster) Client() (client.Client, error)

func (*Cluster) Close added in v1.3.0

func (s *Cluster) Close() error

func (*Cluster) Open added in v1.3.0

func (s *Cluster) Open() error

func (*Cluster) Test added in v1.3.0

func (s *Cluster) Test() error

func (*Cluster) Update added in v1.3.0

func (s *Cluster) Update(c Config) error

type Config

type Config struct {
	Enabled    bool     `toml:"enabled" override:"enabled"`
	ID         string   `toml:"id" override:"id"`
	InCluster  bool     `toml:"in-cluster" override:"in-cluster"`
	APIServers []string `toml:"api-servers" override:"api-servers"`
	Token      string   `toml:"token" override:"token,redact"`
	CAPath     string   `toml:"ca-path" override:"ca-path"`
	Namespace  string   `toml:"namespace" override:"namespace"`
	Resource   string   `toml:"resource" override:"resource"`
}

func NewConfig

func NewConfig() Config

func (Config) ClientConfig

func (c Config) ClientConfig() (client.Config, error)

func (Config) Prom added in v1.3.0

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

Prom writes the prometheus configuration for discoverer into ScrapeConfig

func (Config) Service added in v1.3.0

func (c Config) Service() string

Service return discoverer type

func (Config) ServiceID added in v1.3.0

func (c Config) ServiceID() string

ServiceID returns the discoverers name

func (Config) Validate

func (c Config) Validate() error

type Configs added in v1.3.0

type Configs []Config

func (*Configs) UnmarshalTOML added in v1.3.0

func (cs *Configs) UnmarshalTOML(data interface{}) error

func (Configs) Validate added in v1.3.0

func (cs Configs) Validate() error

type Service

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

Service is the kubernetes discovery and autoscale service

func NewService

func NewService(c []Config, r scraper.Registry, l *log.Logger) (*Service, error)

NewService creates a new unopened k8s service

func (*Service) Client

func (s *Service) Client(id string) (client.Client, error)

func (*Service) Close

func (s *Service) Close() error

func (*Service) Open

func (s *Service) Open() error

Open starts the kubernetes service

func (*Service) Test

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

func (*Service) TestOptions

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

func (*Service) Update

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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