{"modulePath":"github.com/projectsveltos/addon-controller","version":"v1.18.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package scope\n\n## Types\n\n```go\ntype ClusterPromotionScope struct {\n\tlogr.Logger\n\n\tClusterPromotion *configv1beta1.ClusterPromotion\n\t// contains filtered or unexported fields\n}\n```\nClusterPromotionScope defines the basic context for an actuator to operate upon.\n\n```go\nfunc NewClusterPromotionScope(params *ClusterPromotionScopeParams) (*ClusterPromotionScope, error)\n```\nNewClusterPromotionScope creates a new ClusterPromotion Scope from the supplied parameters. This is meant to be called for each reconcile iteration.\n\n```go\nfunc (s *ClusterPromotionScope) Close(ctx context.Context) error\n```\nClose closes the current scope persisting the clusterprofile configuration and status.\n\n```go\nfunc (s *ClusterPromotionScope) Name() string\n```\nName returns the ClusterPromotion name.\n\n```go\nfunc (s *ClusterPromotionScope) PatchObject(ctx context.Context) error\n```\nPatchObject persists the cluster configuration and status.\n\n```go\nfunc (s *ClusterPromotionScope) ProfileSpecHash() []byte\n```\nProfileSpecHash returns the stored ProfileSpec hash\n\n```go\nfunc (s *ClusterPromotionScope) StagesHash() []byte\n```\nProfileHash returns the stored Stages Hash\n\n```go\ntype ClusterPromotionScopeParams struct {\n\tClient           client.Client\n\tLogger           logr.Logger\n\tClusterPromotion *configv1beta1.ClusterPromotion\n\tControllerName   string\n}\n```\nClusterPromotionScopeParams defines the input parameters used to create a new ClusterPromotion Scope.\n\n```go\ntype ClusterSummaryScope struct {\n\tlogr.Logger\n\n\tProfile        client.Object\n\tClusterSummary *configv1beta1.ClusterSummary\n\t// contains filtered or unexported fields\n}\n```\nClusterSummaryScope defines the basic context for an actuator to operate upon.\n\n```go\nfunc NewClusterSummaryScope(params *ClusterSummaryScopeParams) (*ClusterSummaryScope, error)\n```\nNewClusterSummaryScope creates a new ClusterSummary Scope from the supplied parameters. This is meant to be called for each reconcile iteration.\n\n```go\nfunc (s *ClusterSummaryScope) Close(ctx context.Context) error\n```\nClose closes the current scope persisting the clusterprofile configuration and status.\n\n```go\nfunc (s *ClusterSummaryScope) IsContinuousSync() bool\n```\nIsContinuousSync returns true if ClusterProfile is set to keep updating workload cluster\n\n```go\nfunc (s *ClusterSummaryScope) IsContinuousWithDriftDetection() bool\n```\nIsContinuousWithDriftDetection returns true if ClusterProfile is set to SyncModeContinuousWithDriftDetection\n\n```go\nfunc (s *ClusterSummaryScope) IsDryRunSync() bool\n```\nIsDryRunSync returns true if ClusterProfile sync mod is set to dryRun\n\n```go\nfunc (s *ClusterSummaryScope) IsOneTimeSync() bool\n```\nIsOneTimeSync returns true if ClusterProfile sync mod is set to one time\n\n```go\nfunc (s *ClusterSummaryScope) Name() string\n```\nName returns the ClusterSummary name.\n\n```go\nfunc (s *ClusterSummaryScope) Namespace() string\n```\nNamespace returns the ClusterSummary namespace.\n\n```go\nfunc (s *ClusterSummaryScope) PatchObject(ctx context.Context) error\n```\nPatchObject persists the cluster configuration and status.\n\n```go\nfunc (s *ClusterSummaryScope) ResetConsecutiveFailures(featureID libsveltosv1beta1.FeatureID)\n```\nResetConsecutiveFailures reset status consecutiveFailures\n\n```go\nfunc (s *ClusterSummaryScope) SetDependenciesMessage(message *string)\n```\nSetDependenciesMessage sets the dependencies status.\n\n```go\nfunc (s *ClusterSummaryScope) SetFailureMessage(featureID libsveltosv1beta1.FeatureID, failureMessage *string)\n```\nSetFailureMessage sets the infrastructure status failure message.\n\n```go\nfunc (s *ClusterSummaryScope) SetFailureReason(featureID libsveltosv1beta1.FeatureID,\n\tfailureReason *string)\n```\nSetFailureReason sets the feature status failure reason.\n\n```go\nfunc (s *ClusterSummaryScope) SetFeatureStatus(featureID libsveltosv1beta1.FeatureID,\n\tstatus libsveltosv1beta1.FeatureStatus, hash []byte, failed *bool)\n```\nSetFeatureStatus sets the feature status.\n\n```go\nfunc (s *ClusterSummaryScope) SetLastAppliedTime(featureID libsveltosv1beta1.FeatureID,\n\tlastAppliedTime *metav1.Time)\n```\n\n```go\nfunc (s *ClusterSummaryScope) SetResourceSummaryDeployed(featureID libsveltosv1beta1.FeatureID, deployed bool)\n```\nSetResourceSummaryDeployed sets ResourceSummaryDeployed on the FeatureSummary for featureID. No-op if no FeatureSummary entry exists for featureID yet.\n\n```go\nfunc (s *ClusterSummaryScope) ShouldRemoveResourceSummary(featureID libsveltosv1beta1.FeatureID) bool\n```\nShouldRemoveResourceSummary returns true if the FeatureSummary for featureID indicates that a ResourceSummary section may still be present in the managed cluster: nil means unknown (e.g. after an upgrade), true means currently deployed. Returns false when the entry is explicitly marked false (already removed) or absent.\n\n```go\ntype ClusterSummaryScopeParams struct {\n\tClient         client.Client\n\tLogger         logr.Logger\n\tProfile        client.Object\n\tClusterSummary *configv1beta1.ClusterSummary\n\tControllerName string\n}\n```\nClusterSummaryScopeParams defines the input parameters used to create a new ClusterSummary Scope.\n\n```go\ntype ProfileScope struct {\n\tlogr.Logger\n\n\tProfile client.Object\n\t// contains filtered or unexported fields\n}\n```\nProfileScope defines the basic context for an actuator to operate upon.\n\n```go\nfunc NewProfileScope(params ProfileScopeParams) (*ProfileScope, error)\n```\nNewProfileScope creates a new Profile Scope from the supplied parameters. This is meant to be called for each reconcile iteration.\n\n```go\nfunc (s *ProfileScope) ClearFailedClusters(cluster *corev1.ObjectReference)\n```\n\n```go\nfunc (s *ProfileScope) Close(ctx context.Context) error\n```\nClose closes the current scope persisting the Profile configuration and status.\n\n```go\nfunc (s *ProfileScope) ControllerName() string\n```\nControllerName returns the name of the controller that created the ProfileScope.\n\n```go\nfunc (s *ProfileScope) GetClusterProfile() *configv1beta1.ClusterProfile\n```\n\n```go\nfunc (s *ProfileScope) GetKind() string\n```\n\n```go\nfunc (s *ProfileScope) GetProfile() *configv1beta1.Profile\n```\n\n```go\nfunc (s *ProfileScope) GetSelector() *metav1.LabelSelector\n```\nGetSelector returns the ClusterSelector\n\n```go\nfunc (s *ProfileScope) GetSpec() *configv1beta1.Spec\n```\n\n```go\nfunc (s *ProfileScope) GetStatus() *configv1beta1.Status\n```\n\n```go\nfunc (s *ProfileScope) IsContinuousSync() bool\n```\nIsContinuousSync returns true if Profile is set to keep updating workload cluster\n\n```go\nfunc (s *ProfileScope) IsDryRunSync() bool\n```\nIsDryRunSync returns true if Profile sync mod is set to dryRun\n\n```go\nfunc (s *ProfileScope) IsOneTimeSync() bool\n```\nIsOneTimeSync returns true if Profile sync mod is set to one time\n\n```go\nfunc (s *ProfileScope) Name() string\n```\nName returns the Profile name.\n\n```go\nfunc (s *ProfileScope) Namespace() string\n```\nNamespace returns the Profile namespace.\n\n```go\nfunc (s *ProfileScope) PatchObject(ctx context.Context) error\n```\nPatchObject persists the feature configuration and status.\n\n```go\nfunc (s *ProfileScope) SetFailedClusters(cluster *corev1.ObjectReference, err error)\n```\n\n```go\nfunc (s *ProfileScope) SetMatchingClusterRefs(matchingClusters []corev1.ObjectReference)\n```\nSetMatchingClusterRefs sets the feature status.\n\n```go\ntype ProfileScopeParams struct {\n\tClient         client.Client\n\tLogger         logr.Logger\n\tProfile        client.Object\n\tControllerName string\n}\n```\nProfileScopeParams defines the input parameters used to create a new Profile Scope.\n\n```go\ntype SetScope struct {\n\tlogr.Logger\n\n\tSet client.Object\n\t// contains filtered or unexported fields\n}\n```\nSetScope defines the basic context for an actuator to operate upon.\n\n```go\nfunc NewSetScope(params SetScopeParams) (*SetScope, error)\n```\nNewSetScope creates a new Set Scope from the supplied parameters. This is meant to be called for each reconcile iteration.\n\n```go\nfunc (s *SetScope) Close(ctx context.Context) error\n```\nClose closes the current scope persisting the Set configuration and status.\n\n```go\nfunc (s *SetScope) ControllerName() string\n```\nControllerName returns the name of the controller that created the SetScope.\n\n```go\nfunc (s *SetScope) GetClusterSet() *libsveltosv1beta1.ClusterSet\n```\n\n```go\nfunc (s *SetScope) GetKind() string\n```\n\n```go\nfunc (s *SetScope) GetSelector() *metav1.LabelSelector\n```\nGetSelector returns the ClusterSelector\n\n```go\nfunc (s *SetScope) GetSet() *libsveltosv1beta1.Set\n```\n\n```go\nfunc (s *SetScope) GetSpec() *libsveltosv1beta1.Spec\n```\n\n```go\nfunc (s *SetScope) GetStatus() *libsveltosv1beta1.Status\n```\n\n```go\nfunc (s *SetScope) Name() string\n```\nName returns the Set name.\n\n```go\nfunc (s *SetScope) PatchObject(ctx context.Context) error\n```\nPatchObject persists the feature configuration and status.\n\n```go\nfunc (s *SetScope) SetMatchingClusterRefs(matchingClusters []corev1.ObjectReference)\n```\nSetMatchingClusterRefs sets the feature status.\n\n```go\nfunc (s *SetScope) SetSelectedClusterRefs(selectedClusters []corev1.ObjectReference)\n```\nSetSelectedClusters sets the feature status.\n\n```go\ntype SetScopeParams struct {\n\tClient         client.Client\n\tLogger         logr.Logger\n\tSet            client.Object\n\tControllerName string\n}\n```\nSetScopeParams defines the input parameters used to create a new Set Scope.\n\n","path":"github.com/projectsveltos/addon-controller/pkg/scope","name":"scope","synopsis":"","isRedistributable":true}
