{"modulePath":"github.com/stackpointcloud/kubernetes","version":"v1.3.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package replication\n\nPackage replication contains logic for watching and synchronizing replication controllers.\n\n## Constants\n\n```go\nconst (\n\t// We'll attempt to recompute the required replicas of all replication controllers\n\t// that have fulfilled their expectations at least this often. This recomputation\n\t// happens based on contents in local pod storage.\n\t// Full Resync shouldn't be needed at all in a healthy system. This is a protection\n\t// against disappearing objects and watch notification, that we believe should not\n\t// happen at all.\n\t// TODO: We should get rid of it completely in the fullness of time.\n\tFullControllerResyncPeriod = 10 * time.Minute\n\n\t// Realistic value of the burstReplica field for the replication manager based off\n\t// performance requirements for kubernetes 1.0.\n\tBurstReplicas = 500\n\n\t// We must avoid counting pods until the pod store has synced. If it hasn't synced, to\n\t// avoid a hot loop, we'll wait this long between checks.\n\tPodStoreSyncedPollPeriod = 100 * time.Millisecond\n)\n```\n\n## Types\n\n```go\ntype OverlappingControllers []api.ReplicationController\n```\nOverlappingControllers sorts a list of controllers by creation timestamp, using their names as a tie breaker.\n\n```go\nfunc (o OverlappingControllers) Len() int\n```\n\n```go\nfunc (o OverlappingControllers) Less(i, j int) bool\n```\n\n```go\nfunc (o OverlappingControllers) Swap(i, j int)\n```\n\n```go\ntype ReplicationManager struct {\n\t// contains filtered or unexported fields\n}\n```\nReplicationManager is responsible for synchronizing ReplicationController objects stored in the system with actual running pods. TODO: this really should be called ReplicationController. The only reason why it's a Manager is to distinguish this type from API object \"ReplicationController\". We should fix this.\n\n```go\nfunc NewReplicationManager(podInformer framework.SharedIndexInformer, kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc, burstReplicas int, lookupCacheSize int) *ReplicationManager\n```\nNewReplicationManager creates a replication manager\n\n```go\nfunc NewReplicationManagerFromClient(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc, burstReplicas int, lookupCacheSize int) *ReplicationManager\n```\nNewReplicationManagerFromClient creates a new ReplicationManager that runs its own informer.\n\n```go\nfunc NewReplicationManagerFromClientForIntegration(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc, burstReplicas int, lookupCacheSize int) *ReplicationManager\n```\nNewReplicationManagerFromClientForIntegration creates a new ReplicationManager that runs its own informer.  It disables event recording for use in integration tests.\n\n```go\nfunc (rm *ReplicationManager) Run(workers int, stopCh \u003c-chan struct{})\n```\nRun begins watching and syncing.\n\n```go\nfunc (rm *ReplicationManager) SetEventRecorder(recorder record.EventRecorder)\n```\nSetEventRecorder replaces the event recorder used by the replication manager with the given recorder. Only used for testing.\n\n","path":"github.com/stackpointcloud/kubernetes/pkg/controller/replication","name":"replication","synopsis":"Package replication contains logic for watching and synchronizing replication controllers.","isRedistributable":true}
