Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClustersPerPolicyBundle ¶
type BaseClustersPerPolicyBundle struct { Objects []*PolicyGenericComplianceStatus `json:"objects"` LeafHubName string `json:"leafHubName"` BundleVersion *BundleVersion `json:"bundleVersion"` }
BaseClustersPerPolicyBundle the base struct for clusters per policy bundle and contains the full state.
type BaseCompleteComplianceStatusBundle ¶
type BaseCompleteComplianceStatusBundle struct { Objects []*PolicyCompleteComplianceStatus `json:"objects"` LeafHubName string `json:"leafHubName"` BaseBundleVersion *BundleVersion `json:"baseBundleVersion"` BundleVersion *BundleVersion `json:"bundleVersion"` }
BaseCompleteComplianceStatusBundle the base struct for complete state compliance status bundle.
type BaseDeltaComplianceStatusBundle ¶
type BaseDeltaComplianceStatusBundle struct { Objects []*PolicyGenericComplianceStatus `json:"objects"` LeafHubName string `json:"leafHubName"` BaseBundleVersion *BundleVersion `json:"baseBundleVersion"` BundleVersion *BundleVersion `json:"bundleVersion"` }
BaseDeltaComplianceStatusBundle the base struct for delta state compliance status bundle.
type BaseMinimalComplianceStatusBundle ¶
type BaseMinimalComplianceStatusBundle struct { Objects []*MinimalPolicyComplianceStatus `json:"objects"` LeafHubName string `json:"leafHubName"` BundleVersion *BundleVersion `json:"bundleVersion"` }
BaseMinimalComplianceStatusBundle the base struct for minimal compliance status bundle.
type BundleSyncMode ¶
type BundleSyncMode int8
BundleSyncMode used to identify hybrid sync mode - complete/delta bundles.
const ( // CompleteStateMode used to identify sync mode of complete state bundles. CompleteStateMode BundleSyncMode = iota // DeltaStateMode used to identify sync mode of delta state bundles. DeltaStateMode BundleSyncMode = iota )
type BundleVersion ¶
type BundleVersion struct { Incarnation uint64 `json:"incarnation"` Generation uint64 `json:"generation"` }
BundleVersion holds the information necessary for the consumers of status bundles to compare versions correctly. Incarnation is the instance-version of the sender component, a counter that increments on restarts of the latter. Generation is the bundle-version relative to the sender's instance, increments on bundle updates.
func NewBundleVersion ¶
func NewBundleVersion(incarnation uint64, generation uint64) *BundleVersion
NewBundleVersion returns a new instance of BundleVersion.
func (*BundleVersion) Equals ¶
func (version *BundleVersion) Equals(other *BundleVersion) bool
Equals returns whether the caller's version is equal to that received as argument.
func (*BundleVersion) NewerThan ¶
func (version *BundleVersion) NewerThan(other *BundleVersion) bool
NewerThan returns whether the caller's version is newer than that received as argument.
If other = nil the result is true.
func (*BundleVersion) String ¶
func (version *BundleVersion) String() string
String returns string representation of the bundle version.
type MinimalPolicyComplianceStatus ¶
type MinimalPolicyComplianceStatus struct { PolicyID string `json:"policyId"` RemediationAction policyv1.RemediationAction `json:"remediationAction"` NonCompliantClusters int `json:"nonCompliantClusters"` AppliedClusters int `json:"appliedClusters"` }
MinimalPolicyComplianceStatus holds information for minimal policy compliance status.
type PolicyCompleteComplianceStatus ¶
type PolicyCompleteComplianceStatus struct { PolicyID string `json:"policyId"` NonCompliantClusters []string `json:"nonCompliantClusters"` UnknownComplianceClusters []string `json:"unknownComplianceClusters"` }
PolicyCompleteComplianceStatus holds information for (optimized) policy compliance status.
type PolicyGenericComplianceStatus ¶
type PolicyGenericComplianceStatus struct { PolicyID string `json:"policyId"` CompliantClusters []string `json:"compliantClusters"` NonCompliantClusters []string `json:"nonCompliantClusters"` UnknownComplianceClusters []string `json:"unknownComplianceClusters"` }
PolicyGenericComplianceStatus holds information for policy compliance status and may be used either for complete or delta state bundles.