controller

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client queries metrics from the controller process.

func NewClient

func NewClient(host string, port uint, client *http.Client) (*Client, error)

NewClient generates a client to hit the given controller.

func (*Client) GetMetrics

func (c *Client) GetMetrics() (*Metrics, error)

GetMetrics returns the latest Metrics parsed from the kube-controller endpoint.

type Metrics

type Metrics struct {
	CreateTime    int64
	NodeEvictions int64
}

Metrics are parsed values from the kube-controller.

func NewMetrics

func NewMetrics(body []byte) (*Metrics, error)

NewMetrics creates a Metrics object from a Prometheus response body.

type Source

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

Source pulls data from the controller source, and translates it for GCMv3.

func NewSource

func NewSource(cfg *monitor.SourceConfig) (*Source, error)

NewSource creates a new Source for a kube-controller.

func (*Source) GetTimeSeriesReq

func (s *Source) GetTimeSeriesReq() (*v3.CreateTimeSeriesRequest, error)

GetTimeSeriesReq returns the GCM v3 TimeSeries data.

func (*Source) Name

func (s *Source) Name() string

Name returns the name of the component being monitored.

func (*Source) ProjectPath

func (s *Source) ProjectPath() string

ProjectPath returns the project's path in a way Stackdriver understands.

type Translator

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

Translator contains the required information to perform translations from kubelet summarys to GCM's GKE metrics.

func NewTranslator

func NewTranslator(zone, project, cluster, instanceID string, resolution time.Duration) *Translator

NewTranslator creates a new Translator with the given fields.

func (*Translator) Translate

func (t *Translator) Translate(metrics *Metrics) (*v3.CreateTimeSeriesRequest, error)

Translate a summary to its TimeSeries.

Jump to

Keyboard shortcuts

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