Documentation ¶
Overview ¶
Package master contains code for setting up and running a kubenetes cluster master.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Client *client.Client Cloud cloudprovider.Interface EtcdServers []string HealthCheckMinions bool Minions []string MinionCacheTTL time.Duration MinionRegexp string PodInfoGetter client.PodInfoGetter }
Config is a structure used to configure a Master.
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
Master contains state for a Kubernetes cluster master/api server.
func NewMemoryServer ¶
NewMemoryServer returns a new instance of Master backed with memory (not etcd).
func (*Master) ConstructHandler ¶
ConstructHandler returns an http.Handler which serves the Kubernetes API. Instead of calling Run, you can call this function to get a handler for your own server. It is intended for testing. Only call once.
type PodCache ¶
type PodCache struct {
// contains filtered or unexported fields
}
PodCache contains both a cache of container information, as well as the mechanism for keeping that cache up to date.
func NewPodCache ¶
func NewPodCache(info client.PodInfoGetter, pods registry.PodRegistry, period time.Duration) *PodCache
NewPodCache returns a new PodCache which watches container information registered in the given PodRegistry.
func (*PodCache) GetPodInfo ¶
GetPodInfo Implements the PodInfoGetter.GetPodInfo. The returned value should be treated as read-only.
func (*PodCache) Loop ¶
func (p *PodCache) Loop()
Loop begins watching updates of container information. It runs forever, and is expected to be placed in a go routine.
func (*PodCache) UpdateAllContainers ¶
func (p *PodCache) UpdateAllContainers()
UpdateAllContainers updates information about all containers. Either called by Loop() below, or one-off.