Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArcToID ¶
type ArcToID[VID, AT comparable] struct { To VID ArcType AT }
type Namespaces ¶
type Namespaces struct { Names []string LabelSelector string FieldSelector string ObjectSelectorExpression cel.Program // can be nil }
func (*Namespaces) All ¶
func (n *Namespaces) All() bool
All checks if all namespaces should be watched.
type ObjectGraph ¶
type ObjectGraph[VID, AT comparable, VD, AD any] struct { // contains filtered or unexported fields }
func NewObjectGraph ¶
func NewObjectGraph[VID, AT comparable, VD, AD any](opts ObjectGraphOpts[VID, AT, VD, AD]) *ObjectGraph[VID, AT, VD, AD]
func (*ObjectGraph[VID, AT, VD, AD]) DeleteVertex ¶
func (g *ObjectGraph[VID, AT, VD, AD]) DeleteVertex(vid VID)
DeleteVertex deletes the vertex with the specified VID. All outbound arcs are also deleted.
func (*ObjectGraph[VID, AT, VD, AD]) SetVertex ¶
func (g *ObjectGraph[VID, AT, VD, AD]) SetVertex(vid VID, vd VD, arcs arcSet[VID, AT, AD])
SetVertex sets a vertex in the graph declaratively: - replaces the existing vertex or adds a new one with the specified VID. - replaces all outbound arcs of that vertex with the provided arcs. arcs may be nil.
type ObjectGraphOpts ¶
type Opts ¶
type Opts struct { Log *slog.Logger Queries []any // Elements are QueryInclude or QueryExclude Namespaces Namespaces Roots *rpc.Roots // can be nil RPCAPI modshared.RPCAPI DiscoClient discovery.AggregatedDiscoveryInterface Client dynamic.Interface OnWarning func(Warning) Graph *ObjectGraph[VertexID, ArcType, VertexData, ArcData] }
type QueryExclude ¶
type QueryInclude ¶
type QueryInclude struct { ResourceSelectorExpression cel.Program // never nil Object QueryIncludeObject }
type QueryIncludeObject ¶
type QueryIncludeObject struct { LabelSelector string FieldSelector string ObjectSelectorExpression cel.Program // can be nil JSONPath *jsonpath.JSONPath // can be nil }
QueryIncludeObject holds config for object filtering.
type VertexData ¶
type VertexID ¶
type VertexID struct { GVR schema.GroupVersionResource Namespace string Name string }
type Warning ¶
func NewObjectProcessingWarning ¶
func NewObjectProcessingWarning(gvr schema.GroupVersionResource, namespace, name, message string) Warning
type WatchGraph ¶
type WatchGraph struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts Opts) *WatchGraph
Source Files
¶
- discovery.go
- error.go
- namespaces.go
- obj2vertex.go
- obj2vertex_arc.go
- obj2vertex_arc_cluster_role_binding.go
- obj2vertex_arc_container.go
- obj2vertex_arc_cron_job.go
- obj2vertex_arc_csi_storage_capacity.go
- obj2vertex_arc_daemon_set.go
- obj2vertex_arc_deployment.go
- obj2vertex_arc_env_from_source.go
- obj2vertex_arc_env_var.go
- obj2vertex_arc_ephemeral_container.go
- obj2vertex_arc_event.go
- obj2vertex_arc_horizontal_pod_autoscaler.go
- obj2vertex_arc_ingress.go
- obj2vertex_arc_job.go
- obj2vertex_arc_owner_ref.go
- obj2vertex_arc_persistent_volume.go
- obj2vertex_arc_persistent_volume_claim.go
- obj2vertex_arc_pod.go
- obj2vertex_arc_pod_spec.go
- obj2vertex_arc_replica_set.go
- obj2vertex_arc_replication_controller.go
- obj2vertex_arc_role_binding.go
- obj2vertex_arc_service_account.go
- obj2vertex_arc_stateful_set.go
- obj2vertex_arc_volume.go
- obj2vertex_arc_volume_attachment.go
- obj2vertex_data.go
- object_graph.go
- resource_event_handler.go
- warning.go
- watch_graph.go
Click to show internal directories.
Click to hide internal directories.