Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWorkloadList ¶
func GetWorkloadList(ctx context.Context, c client.Client, store Store, namespace string, match rolloutv1alpha1.ResourceMatch) ([]workload.Interface, error)
GetWorkloadList implements WorkloadManager.
Types ¶
type Registry ¶
type Registry interface {
// SetupWithManger initialize registry with manager.
SetupWithManger(mgr manager.Manager)
// Register add a new workload store for given gvk
Register(store Store)
// Delete delete a new workload store for given gvk
Delete(gvk schema.GroupVersionKind)
// If the gvk is registered and supported by all member clusters, Get returns the workload rest store.
Get(gvk schema.GroupVersionKind) (Store, error)
// WatchableStores return all watchable and supported stores.
WatchableStores() []Store
}
type Store ¶
type Store interface {
GroupVersionKind() schema.GroupVersionKind
// NewObject returns a new instance of the workload type
NewObject() client.Object
// NewObjectList returns a new instance of the workload list type
NewObjectList() client.ObjectList
// Watchable indicates whether this workload type can be watched from the API server.
Watchable() bool
// Wrap get a client.Object and returns a workload interface
Wrap(cluster string, obj client.Object) (workload.Interface, error)
// Get returns a wrapped workload interface
Get(ctx context.Context, cluster, namespace, name string) (workload.Interface, error)
// GetWorkloadList finds workload by match
List(ctx context.Context, namespace string, match rolloutv1alpha1.ResourceMatch) ([]workload.Interface, error)
}
Standard workload store interface
Click to show internal directories.
Click to hide internal directories.