package config
import "k8s.io/kubernetes/pkg/kubelet/config"
Package config implements the pod configuration readers.
Reads the pod configuration from etcd using the Kubernetes etcd schema.
Reads the pod configuration from file or a directory of files.
Reads the pod configuration from an HTTP GET response.
Index ¶
- Constants
- func EtcdKeyForHost(hostname string) string
- func NewSourceEtcd(key string, client tools.EtcdClient, updates chan<- interface{})
- func NewSourceFile(path string, period time.Duration, updates chan<- interface{})
- func NewSourceURL(url string, period time.Duration, updates chan<- interface{})
- type PodConfig
- func NewPodConfig(mode PodConfigNotificationMode) *PodConfig
- func (c *PodConfig) Channel(source string) chan<- interface{}
- func (c *PodConfig) Sync()
- func (c *PodConfig) Updates() <-chan kubelet.PodUpdate
- type PodConfigNotificationMode
Constants ¶
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. PodConfigNotificationSnapshotAndUpdates // PodConfigNotificationIncremental delivers ADD, UPDATE, and REMOVE to the update channel. PodConfigNotificationIncremental )
Functions ¶
func EtcdKeyForHost ¶
func NewSourceEtcd ¶
func NewSourceEtcd(key string, client tools.EtcdClient, updates chan<- interface{})
NewSourceEtcd creates a config source that watches and pulls from a key in etcd
func NewSourceFile ¶
func NewSourceURL ¶
Types ¶
type PodConfig ¶
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 ¶
func NewPodConfig(mode PodConfigNotificationMode) *PodConfig
NewPodConfig creates an object that can merge many configuration sources into a stream of normalized updates to a pod configuration.
func (*PodConfig) Channel ¶
Channel creates or returns a config source channel. The channel only accepts PodUpdates
func (*PodConfig) Sync ¶
func (c *PodConfig) Sync()
Sync requests the full configuration be delivered to the update channel.
func (*PodConfig) Updates ¶
Updates returns a channel of updates to the configuration, properly denormalized.
type PodConfigNotificationMode ¶
type PodConfigNotificationMode int
PodConfigNotificationMode describes how changes are sent to the update channel.
Source Files ¶
config.go doc.go etcd.go file.go http.go
- Version
- v0.7.3
- Published
- Jan 8, 2015
- Platform
- js/wasm
- Imports
- 28 packages
- Last checked
- 29 seconds ago –
Tools for package owners.