kubernetes: github.com/erimatnor/kubernetes/pkg/kubelet/config Index | Files

package config

import "github.com/erimatnor/kubernetes/pkg/kubelet/config"

Reads the pod configuration from the Kubernetes apiserver.

Common logic used by both http and file channels.

Package config implements the pod configuration readers.

Reads the pod configuration from file or a directory of files.

Reads the pod configuration from an HTTP GET response.


Package Files

apiserver.go common.go config.go doc.go file.go http.go


const (
    // PodConfigNotificationSnapshot delivers the full configuration as a SET whenever
    // any change occurs.
    PodConfigNotificationSnapshot = iota
    // PodConfigNotificationSnapshotAndUpdates delivers an UPDATE message whenever pods are
    // changed, and a SET message if there are any additions or removals.
    // PodConfigNotificationIncremental delivers ADD, UPDATE, and REMOVE to the update channel.

func NewSourceApiserver Uses

func NewSourceApiserver(c *client.Client, hostname string, updates chan<- interface{})

NewSourceApiserver creates a config source that watches and pulls from the apiserver.

func NewSourceFile Uses

func NewSourceFile(path string, hostname string, period time.Duration, updates chan<- interface{})

func NewSourceURL Uses

func NewSourceURL(url, hostname string, period time.Duration, updates chan<- interface{})

type PodConfig Uses

type PodConfig struct {
    // contains filtered or unexported fields

PodConfig is a configuration mux that merges many sources of pod configuration into a single consistent structure, and then delivers incremental change notifications to listeners in order.

func NewPodConfig Uses

func NewPodConfig(mode PodConfigNotificationMode, recorder record.EventRecorder) *PodConfig

NewPodConfig creates an object that can merge many configuration sources into a stream of normalized updates to a pod configuration.

func (*PodConfig) Channel Uses

func (c *PodConfig) Channel(source string) chan<- interface{}

Channel creates or returns a config source channel. The channel only accepts PodUpdates

func (*PodConfig) SeenAllSources Uses

func (c *PodConfig) SeenAllSources() bool

SeenAllSources returns true if this config has received a SET message from all configured sources, false otherwise.

func (*PodConfig) Sync Uses

func (c *PodConfig) Sync()

Sync requests the full configuration be delivered to the update channel.

func (*PodConfig) Updates Uses

func (c *PodConfig) Updates() <-chan kubelet.PodUpdate

Updates returns a channel of updates to the configuration, properly denormalized.

type PodConfigNotificationMode Uses

type PodConfigNotificationMode int

PodConfigNotificationMode describes how changes are sent to the update channel.

Package config imports 31 packages (graph). Updated 2017-05-11. Refresh now. Tools for package owners.