Documentation
¶
Index ¶
- type Bundle
- func NewClustersPerPolicyBundle(leafHubName string, incarnation uint64, extractObjIDFunc ExtractObjIDFunc) Bundle
- func NewCompleteComplianceStatusBundle(leafHubName string, baseBundle Bundle, incarnation uint64, ...) Bundle
- func NewGenericStatusBundle(leafHubName string, incarnation uint64, cleanObjFunc func(obj Object)) Bundle
- func NewMinimalComplianceStatusBundle(leafHubName string, incarnation uint64) Bundle
- type ClustersPerPolicyBundle
- type ComplianceStatusBundle
- type ControlInfoBundle
- type DeltaComplianceStatusBundle
- func (bundle *DeltaComplianceStatusBundle) DeleteObject(object Object)
- func (bundle *DeltaComplianceStatusBundle) GetBundleVersion() *statusbundle.BundleVersion
- func (bundle *DeltaComplianceStatusBundle) GetTransportationID() int
- func (bundle *DeltaComplianceStatusBundle) Reset()
- func (bundle *DeltaComplianceStatusBundle) SyncState()
- func (bundle *DeltaComplianceStatusBundle) UpdateObject(object Object)
- type DeltaStateBundle
- type ExtractObjIDFunc
- type GenericStatusBundle
- type MinimalComplianceStatusBundle
- type Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle interface { // UpdateObject function to update a single object inside a bundle. UpdateObject(object Object) // DeleteObject function to delete a single object inside a bundle. DeleteObject(object Object) // GetBundleVersion function to get bundle generation. GetBundleVersion() *status.BundleVersion }
Bundle is an abstraction for managing different bundle types.
func NewClustersPerPolicyBundle ¶
func NewClustersPerPolicyBundle(leafHubName string, incarnation uint64, extractObjIDFunc ExtractObjIDFunc) Bundle
NewClustersPerPolicyBundle creates a new instance of ClustersPerPolicyBundle.
func NewCompleteComplianceStatusBundle ¶
func NewCompleteComplianceStatusBundle(leafHubName string, baseBundle Bundle, incarnation uint64, extractObjIDFunc ExtractObjIDFunc) Bundle
NewCompleteComplianceStatusBundle creates a new instance of ComplianceStatusBundle.
func NewGenericStatusBundle ¶
func NewGenericStatusBundle(leafHubName string, incarnation uint64, cleanObjFunc func(obj Object)) Bundle
NewGenericStatusBundle creates a new instance of GenericStatusBundle.
func NewMinimalComplianceStatusBundle ¶
NewMinimalComplianceStatusBundle creates a new instance of MinimalComplianceStatusBundle.
type ClustersPerPolicyBundle ¶
type ClustersPerPolicyBundle struct { statusbundle.BaseClustersPerPolicyBundle // contains filtered or unexported fields }
ClustersPerPolicyBundle abstracts management of clusters per policy bundle.
func (*ClustersPerPolicyBundle) DeleteObject ¶
func (bundle *ClustersPerPolicyBundle) DeleteObject(object Object)
DeleteObject function to delete a single object inside a bundle.
func (*ClustersPerPolicyBundle) GetBundleVersion ¶
func (bundle *ClustersPerPolicyBundle) GetBundleVersion() *statusbundle.BundleVersion
GetBundleVersion function to get bundle version.
func (*ClustersPerPolicyBundle) UpdateObject ¶
func (bundle *ClustersPerPolicyBundle) UpdateObject(object Object)
UpdateObject function to update a single object inside a bundle.
type ComplianceStatusBundle ¶
type ComplianceStatusBundle struct { statusbundle.BaseCompleteComplianceStatusBundle // contains filtered or unexported fields }
ComplianceStatusBundle abstracts management of compliance status bundle.
func (*ComplianceStatusBundle) DeleteObject ¶
func (bundle *ComplianceStatusBundle) DeleteObject(object Object)
DeleteObject function to delete a single object inside a bundle.
func (*ComplianceStatusBundle) GetBundleVersion ¶
func (bundle *ComplianceStatusBundle) GetBundleVersion() *statusbundle.BundleVersion
GetBundleVersion function to get bundle version.
func (*ComplianceStatusBundle) UpdateObject ¶
func (bundle *ComplianceStatusBundle) UpdateObject(object Object)
UpdateObject function to update a single object inside a bundle.
type ControlInfoBundle ¶
type ControlInfoBundle struct { LeafHubName string `json:"leafHubName"` BundleVersion *statusbundle.BundleVersion `json:"bundleVersion"` // contains filtered or unexported fields }
ControlInfoBundle holds control info passed from LH to HoH.
func NewControlInfoBundle ¶
func NewControlInfoBundle(leafHubName string, incarnation uint64) *ControlInfoBundle
NewControlInfoBundle creates a new instance of ControlInfoBundle.
func (*ControlInfoBundle) DeleteObject ¶
func (bundle *ControlInfoBundle) DeleteObject(Object)
DeleteObject function to delete a single object inside a bundle.
func (*ControlInfoBundle) GetBundleVersion ¶
func (bundle *ControlInfoBundle) GetBundleVersion() *statusbundle.BundleVersion
GetBundleVersion function to get bundle version.
func (*ControlInfoBundle) UpdateObject ¶
func (bundle *ControlInfoBundle) UpdateObject(Object)
UpdateObject function to update a single object inside a bundle.
type DeltaComplianceStatusBundle ¶
type DeltaComplianceStatusBundle struct { statusbundle.BaseDeltaComplianceStatusBundle // contains filtered or unexported fields }
DeltaComplianceStatusBundle abstracts management of compliance status bundle.
func (*DeltaComplianceStatusBundle) DeleteObject ¶
func (bundle *DeltaComplianceStatusBundle) DeleteObject(object Object)
DeleteObject function to delete all instances of a single object inside a bundle.
func (*DeltaComplianceStatusBundle) GetBundleVersion ¶
func (bundle *DeltaComplianceStatusBundle) GetBundleVersion() *statusbundle.BundleVersion
GetBundleVersion function to get bundle version.
func (*DeltaComplianceStatusBundle) GetTransportationID ¶
func (bundle *DeltaComplianceStatusBundle) GetTransportationID() int
GetTransportationID function to get bundle transportation ID to be attached to message-key during transportation.
func (*DeltaComplianceStatusBundle) Reset ¶
func (bundle *DeltaComplianceStatusBundle) Reset()
Reset flushes the objects in the bundle (after delivery).
func (*DeltaComplianceStatusBundle) SyncState ¶
func (bundle *DeltaComplianceStatusBundle) SyncState()
SyncState syncs the state of the delta-bundle with the full-state.
func (*DeltaComplianceStatusBundle) UpdateObject ¶
func (bundle *DeltaComplianceStatusBundle) UpdateObject(object Object)
UpdateObject function to update a single object inside a bundle.
type DeltaStateBundle ¶
type DeltaStateBundle interface { Bundle // GetTransportationID function to get bundle transportation ID to be attached to message-key during transportation. GetTransportationID() int // SyncState syncs the state of the delta-bundle with the full-state. SyncState() // Reset flushes the delta-state bundle's objects. Reset() }
DeltaStateBundle abstracts the logic needed from the delta-state bundle.
func NewDeltaComplianceStatusBundle ¶
func NewDeltaComplianceStatusBundle(leafHubName string, baseBundle Bundle, clustersPerPolicyBundle *ClustersPerPolicyBundle, incarnation uint64, extractObjIDFunc ExtractObjIDFunc) DeltaStateBundle
NewDeltaComplianceStatusBundle creates a new instance of DeltaComplianceStatusBundle.
type ExtractObjIDFunc ¶
ExtractObjIDFunc a function type used to get the id of an object.
type GenericStatusBundle ¶
type GenericStatusBundle struct { Objects []Object `json:"objects"` LeafHubName string `json:"leafHubName"` BundleVersion *statusbundle.BundleVersion `json:"bundleVersion"` // contains filtered or unexported fields }
GenericStatusBundle is a bundle that is used to send to the hub of hubs the leaf CR as is except for fields that are not relevant in the hub of hubs like finalizers, etc. for bundles that require more specific behavior, it's required to implement your own status bundle struct.
func (*GenericStatusBundle) DeleteObject ¶
func (bundle *GenericStatusBundle) DeleteObject(object Object)
DeleteObject function to delete a single object inside a bundle.
func (*GenericStatusBundle) GetBundleVersion ¶
func (bundle *GenericStatusBundle) GetBundleVersion() *statusbundle.BundleVersion
GetBundleVersion function to get bundle version.
func (*GenericStatusBundle) UpdateObject ¶
func (bundle *GenericStatusBundle) UpdateObject(object Object)
UpdateObject function to update a single object inside a bundle.
type MinimalComplianceStatusBundle ¶
type MinimalComplianceStatusBundle struct { statusbundle.BaseMinimalComplianceStatusBundle // contains filtered or unexported fields }
MinimalComplianceStatusBundle abstracts management of minimal compliance status bundle.
func (*MinimalComplianceStatusBundle) DeleteObject ¶
func (bundle *MinimalComplianceStatusBundle) DeleteObject(object Object)
DeleteObject function to delete a single object inside a bundle.
func (*MinimalComplianceStatusBundle) GetBundleVersion ¶
func (bundle *MinimalComplianceStatusBundle) GetBundleVersion() *statusbundle.BundleVersion
GetBundleVersion function to get bundle version.
func (*MinimalComplianceStatusBundle) UpdateObject ¶
func (bundle *MinimalComplianceStatusBundle) UpdateObject(object Object)
UpdateObject function to update a single object inside a bundle.