sources

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2015 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostRequestAndGetValue

func PostRequestAndGetValue(client *http.Client, req *http.Request, value interface{}) error

Types

type EventError

type EventError interface {
	error
	WatchLoopTerminated() bool // Returns true if the watch loop is terminated
}

type EventsSource

type EventsSource interface {
	// Returns all new events since GetEvents was last called.
	GetEvents() ([]kubeapi.Event, EventError)
	// Terminates existing watch loop, if any, and starts new instance
	RestartWatchLoop()
}

EventsSource objects are used to interact with the event source which aggregates all events from a specified Kubernetes API server

func NewEventsSource

func NewEventsSource(client *kubeclient.Client) EventsSource

NewEventsSource initializes a new events source and starts a goroutine to watch/fetch event updates.

func NewFakeEventsSource

func NewFakeEventsSource() EventsSource

type Source

type Source interface {
	// Fetches containers or pod information from all the nodes in the cluster.
	// start, end: Represents the time range for stats
	// resolution: Represents the intervals at which samples are collected.
	// Returns:
	// AggregateData: A composite object that contains node, pod and container stats.
	GetInfo(start, end time.Time, resolution time.Duration) (api.AggregateData, error)
	// Returns debug information for the source.
	DebugInfo() string
}

func NewSource

func NewSource(pollDuration time.Duration) (Source, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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