Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByNamespaceAndName ¶
type ByNamespaceAndName []ObjectAndFilterResult
ByNamespaceAndName implements sort.Interface for []ObjectAndFilterResult based on Namespace and Name of Object field. TODO use special fields instead of ResourceId. ResourceId can be changed in the future.
func (ByNamespaceAndName) Len ¶
func (a ByNamespaceAndName) Len() int
func (ByNamespaceAndName) Less ¶
func (a ByNamespaceAndName) Less(i, j int) bool
func (ByNamespaceAndName) Swap ¶
func (a ByNamespaceAndName) Swap(i, j int)
type FieldSelector ¶
type FieldSelector struct {
MatchExpressions []FieldSelectorRequirement `json:"matchExpressions"`
}
type KubeEvent ¶
type KubeEvent struct { MonitorId string Type KubeEventType // Event or Synchronization WatchEvents []WatchEventType Objects []ObjectAndFilterResult }
KubeEvent contains MonitorId from monitor configuration, event type and involved k8s objects.
type KubeEventMode ¶
type KubeEventMode string
TODO remove this type with cleanup of v0.
const ( ModeV0 KubeEventMode = "v0" // No first Synchronization, only Event. ModeIncremental KubeEventMode = "Incremental" // Send Synchronization with existed object and Event for each followed event. )
type KubeEventType ¶
type KubeEventType string
const ( TypeSynchronization KubeEventType = "Synchronization" TypeEvent KubeEventType = "Event" )
type NameSelector ¶
type NameSelector struct {
MatchNames []string `json:"matchNames"`
}
type NamespaceSelector ¶
type NamespaceSelector struct { NameSelector *NameSelector `json:"nameSelector,omitempty"` LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` }
type ObjectAndFilterResult ¶
type ObjectAndFilterResult struct { Metadata struct { JqFilter string Checksum string ResourceId string // Used for sorting RemoveObject bool } Object *unstructured.Unstructured // here is a pointer because of MarshalJSON receiver FilterResult interface{} // since len() return int, there is no reason to use larger int FilterResultSize int ObjectSize int }
func (ObjectAndFilterResult) Map ¶
func (o ObjectAndFilterResult) Map() map[string]interface{}
Map constructs a map suitable for use in binding context.
func (ObjectAndFilterResult) MarshalJSON ¶
func (o ObjectAndFilterResult) MarshalJSON() ([]byte, error)
func (*ObjectAndFilterResult) RemoveFullObject ¶
func (o *ObjectAndFilterResult) RemoveFullObject()
type ObjectAndFilterResults ¶
type ObjectAndFilterResults map[string]*ObjectAndFilterResult
func (ObjectAndFilterResults) Bytes ¶
func (a ObjectAndFilterResults) Bytes() (size int64)
type WatchEventType ¶
type WatchEventType string
const ( WatchEventAdded WatchEventType = "Added" WatchEventModified WatchEventType = "Modified" WatchEventDeleted WatchEventType = "Deleted" )
Click to show internal directories.
Click to hide internal directories.