server

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2016 License: Apache-2.0, Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Emitter       Emitter
	DogStatsDHost string
	Period        time.Duration
	Tags          []string
	NoPublish     bool
}

type Emitter

type Emitter interface {
	Emit() (MetricsBundle, error)
}

func NewAPIEmitter

func NewAPIEmitter(kubeconfig string) (Emitter, error)

func NewKubeletEmitter

func NewKubeletEmitter(source string) Emitter

type Metric

type Metric struct {
	Name  string
	Value int
	Tags  []string
}

type MetricsBundle

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

func (*MetricsBundle) Metrics

func (b *MetricsBundle) Metrics() <-chan Metric

type Publisher

type Publisher interface {
	Publish(MetricsBundle)
}

func NewDogstatsdPublisher

func NewDogstatsdPublisher(dest string, tags []string) (Publisher, error)

func NewLogPublisher

func NewLogPublisher() Publisher

type Server

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

func New

func New(cfg Config) (*Server, error)

func (*Server) Run

func (s *Server) Run()

Jump to

Keyboard shortcuts

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