Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Notify ¶
func Notify( notifChan chan ThreeportNotif, threeportAPIServer string, threeportAPIClient *http.Client, log logr.Logger, notifyWG *sync.WaitGroup, )
Notify collects information about all resources being watched and consolidates it into Threeport objects, then sends that info to the Threeport API. Info colected:
* Watch operations, e.g. ADDED, MODIFIED, DELETED * Runtime objects, i.e. the object as stored in the runtime cluster * Events, i.e. the K8s events where the ojbect involved is the threeport-managed resource
Threeport Objects updated:
* WorkloadInstance:
- consolidated status
* WorkloadResourceInstance:
- all events
- runtime object
- most recent watch operation
* HelmWorkloadInstance:
- consolidated status
Types ¶
type EventSummary ¶
type EventSummary struct { EventUID string WorkloadType string WorkloadInstanceID uint WorkloadResourceInstanceID uint ObjectNamespace string ObjectKind string ObjectName string Timestamp metav1.Time Type string Reason string Message string }
EventSummary contains information collected from events related to threeport-managed resources.
type ResourceOperation ¶
type ResourceOperation struct { WorkloadType string WorkloadResourceInstanceID uint OperationType string OperationObject string }
ResourceOperation contains information gathered from watches on threeport-managed resources.
type ThreeportNotif ¶
type ThreeportNotif struct { Operation *ResourceOperation Event *EventSummary }
ThreeportNotif is the internal object used to transfer info to the Notify function that sends request to the threeport API.