Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceInterpreter ¶
type ResourceInterpreter interface { // Start starts running the component and will never stop running until the context is closed or an error occurs. Start(ctx context.Context) (err error) // HookEnabled tells if any hook exist for specific resource type and operation. HookEnabled(object *unstructured.Unstructured, operationType configv1alpha1.InterpreterOperation) bool // GetReplicas returns the desired replicas of the object as well as the requirements of each replica. GetReplicas(object *unstructured.Unstructured) (replica int32, replicaRequires *workv1alpha2.ReplicaRequirements, err error) // ReviseReplica revises the replica of the given object. ReviseReplica(object *unstructured.Unstructured, replica int64) (*unstructured.Unstructured, error) // Retain returns the objects that based on the "desired" object but with values retained from the "observed" object. Retain(desired *unstructured.Unstructured, observed *unstructured.Unstructured) (retained *unstructured.Unstructured, err error) }
ResourceInterpreter manages both default and customized webhooks to interpret custom resource structure.
func NewResourceInterpreter ¶
func NewResourceInterpreter(kubeconfig string, informer informermanager.SingleClusterInformerManager) ResourceInterpreter
NewResourceInterpreter builds a new ResourceInterpreter object.
Click to show internal directories.
Click to hide internal directories.