graph

package
v0.43.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestString added in v0.43.0

func DestString(self *duckv1.Destination) string

func EmptyEventType

func EmptyEventType() *eventingv1beta3.EventType

Types

type AttributesFilterTransform added in v0.42.0

type AttributesFilterTransform struct {
	Filter *eventingv1.TriggerFilter
}

func (*AttributesFilterTransform) Apply added in v0.42.0

Apply will apply the transform to a given input eventtype. This will "narrow" the eventtype to represent only events which could pass the attribute filter. For example, if the "type" attribute was not yet set on the eventtype, but the filter requires "type"="example.event.type", then after this filter the eventtype would have the attribute definition for "type"="example.event.type". Additionally, if an eventtype can not be narrowed this returns nil. For example using the filter from the earlier example, if the "type" was already set to "other.event.type" then the eventtype would not be compatible.

func (*AttributesFilterTransform) Name added in v0.42.0

func (aft *AttributesFilterTransform) Name() string

type CloudEventOverridesTransform added in v0.42.0

type CloudEventOverridesTransform struct {
	Overrides *duckv1.CloudEventOverrides
}

func (CloudEventOverridesTransform) Apply added in v0.42.0

Apply applies the CloudEventOverrides for a given event source

func (CloudEventOverridesTransform) Name added in v0.42.0

type ConstructorConfig added in v0.43.0

type ConstructorConfig struct {
	RestConfig            rest.Config
	Namespaces            []string
	ShouldAddBroker       func(b eventingv1.Broker) bool
	FetchBrokers          bool
	ShouldAddChannel      func(c messagingv1.Channel) bool
	FetchChannels         bool
	ShouldAddSource       func(s duckv1.Source) bool
	FetchSources          bool
	ShouldAddTrigger      func(t eventingv1.Trigger) bool
	FetchTriggers         bool
	ShouldAddSubscription func(s messagingv1.Subscription) bool
	FetchSubscriptions    bool
	ShouldAddEventType    func(et eventingv1beta3.EventType) bool
	FetchEventTypes       bool
}

type Edge

type Edge struct {
	// contains filtered or unexported fields
}

func (*Edge) From

func (e *Edge) From() *Vertex

func (*Edge) Reference

func (e *Edge) Reference() *duckv1.Destination

func (*Edge) String added in v0.43.0

func (e *Edge) String() string

func (*Edge) To

func (e *Edge) To() *Vertex

type EventTypeTransform

type EventTypeTransform struct {
	EventType *eventingv1beta3.EventType
}

func (EventTypeTransform) Name

func (ett EventTypeTransform) Name() string

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

func ConstructGraph added in v0.43.0

func ConstructGraph(ctx context.Context, config ConstructorConfig, logger zap.Logger) (*Graph, error)

func NewGraph

func NewGraph() *Graph

func (*Graph) AddBroker

func (g *Graph) AddBroker(broker eventingv1.Broker)

func (*Graph) AddChannel

func (g *Graph) AddChannel(channel messagingv1.Channel)

func (*Graph) AddEventType

func (g *Graph) AddEventType(et eventingv1beta3.EventType) error

func (*Graph) AddSource added in v0.42.0

func (g *Graph) AddSource(source duckv1.Source)

func (*Graph) AddSubscription added in v0.42.0

func (g *Graph) AddSubscription(subscription messagingv1.Subscription) error

func (*Graph) AddTrigger

func (g *Graph) AddTrigger(trigger eventingv1.Trigger) error

func (*Graph) GetPrimaryOutEdgeWithRef

func (g *Graph) GetPrimaryOutEdgeWithRef(edgeRef *duckv1.KReference) *Edge

func (*Graph) Lineage

func (g *Graph) Lineage() []*Vertex

func (*Graph) Sources

func (g *Graph) Sources() Vertices

Sources returns all of the sources vertices in a graph A source vertex is defined as a graph with an in degree of 0 and an out degree >= 1 This means that there are only outward edges from the vertex, and no inward edges

func (*Graph) String added in v0.43.0

func (g *Graph) String() string

func (*Graph) UnvisitAll

func (g *Graph) UnvisitAll()

func (*Graph) Vertices

func (g *Graph) Vertices() Vertices

type NoTransform

type NoTransform struct{}

func (NoTransform) Name

func (nt NoTransform) Name() string

type TransformFunctionContext

type TransformFunctionContext struct{}

TODO(cali0707): flesh this out more, know we need it, not sure what needs to be in it yet

func (TransformFunctionContext) DeepCopy

type Vertex

type Vertex struct {
	// contains filtered or unexported fields
}

func (*Vertex) AddEdge

func (v *Vertex) AddEdge(to *Vertex, edgeRef *duckv1.Destination, transform Transform, isDLS bool)

func (*Vertex) InDegree

func (v *Vertex) InDegree() int

func (*Vertex) InEdges

func (v *Vertex) InEdges() []*Edge

func (*Vertex) Lineage

computes the lineage from the given vertex with the given input eventtype

func (*Vertex) NewWithSameRef

func (v *Vertex) NewWithSameRef() *Vertex

func (*Vertex) OutDegree

func (v *Vertex) OutDegree() int

func (*Vertex) OutEdges

func (v *Vertex) OutEdges() []*Edge

func (*Vertex) Reference

func (v *Vertex) Reference() *duckv1.Destination

func (*Vertex) Resource added in v0.43.0

func (v *Vertex) Resource() (obj interface{}, ok bool)

func (*Vertex) String added in v0.43.0

func (v *Vertex) String() string

func (*Vertex) Unvisit

func (v *Vertex) Unvisit()

func (*Vertex) Visit

func (v *Vertex) Visit()

func (*Vertex) Visited

func (v *Vertex) Visited() bool

type Vertices

type Vertices []*Vertex

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL