Documentation ¶
Overview ¶
Package sync implements a queue for syncing resources to an upstream Kubernetes cluster.
Index ¶
- type Action
- func AddEndpointsAction(endpoints *v1.Endpoints) Action
- func AddServiceAction(service *v1.Service) Action
- func DeleteEndpointsAction(endpoints *v1.Endpoints) Action
- func DeleteServiceAction(service *v1.Service) Action
- func UpdateEndpointsAction(endpoints *v1.Endpoints) Action
- func UpdateServiceAction(service *v1.Service) Action
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface { Sync(kube kubernetes.Interface, lm localmetrics.DiscovererMetrics, backendName string) error ObjectMeta() *metav1.ObjectMeta }
Action that is added to the queue for processing
func AddEndpointsAction ¶
AddEndpointsAction returns an action that adds a new endpoint to the cluster
func AddServiceAction ¶
AddServiceAction returns an action that adds a new endpoint to the cluster
func DeleteEndpointsAction ¶
DeleteEndpointsAction returns an action that deletes the given endpoint from the cluster
func DeleteServiceAction ¶
DeleteServiceAction returns an action that deletes the given endpoint from the cluster
func UpdateEndpointsAction ¶
UpdateEndpointsAction returns an action that updates the given endpoint in the cluster
func UpdateServiceAction ¶
UpdateServiceAction returns an action that updates the given endpoint in the cluster
type Queue ¶
type Queue struct { Logger *logrus.Logger KubeClient kubernetes.Interface Workqueue workqueue.RateLimitingInterface Threadiness int Metrics localmetrics.DiscovererMetrics BackendName string ClusterType string }
Queue syncs resources with the Gimbal cluster by working through a queue of actions that must be performed against services and endpoints.
func NewQueue ¶ added in v0.2.0
func NewQueue(logger *logrus.Logger, backendName, clusterType string, kubeClient kubernetes.Interface, threadiness int, metrics localmetrics.DiscovererMetrics) Queue
NewQueue returns an initialized sync.Queue for syncing resources with a Gimbal cluster.