k8s

package
v0.0.0-...-298395c Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

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

func NewCluster

func NewCluster(c Config, d Diagnostic) (*Cluster, error)

func (*Cluster) Client

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

func (*Cluster) Close

func (s *Cluster) Close() error

func (*Cluster) Open

func (s *Cluster) Open() error

func (*Cluster) Test

func (s *Cluster) Test() error

func (*Cluster) Update

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

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

Prom writes the prometheus configuration for discoverer into ScrapeConfig

func (Config) Service

func (c Config) Service() string

Service return discoverer type

func (Config) ServiceID

func (c Config) ServiceID() string

ServiceID returns the discoverers name

func (Config) Validate

func (c Config) Validate() error

type Configs

type Configs []Config

func (*Configs) UnmarshalTOML

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

func (Configs) Validate

func (cs Configs) Validate() error

type Diagnostic

type Diagnostic interface {
	WithClusterContext(cluster string) Diagnostic
}

Doesn't actually get used, but its good to have a template here already

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, d Diagnostic) (*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