Documentation ¶
Index ¶
- func NewSubjectToInformerEventAdapater[T any](subject Subject[T]) cache.ResourceEventHandler
- type Filter
- type FilterPredicate
- type FilterPredicateFunc
- type ImageInfo
- type Observable
- type Observer
- type RadixDeploymentContainerImageMapper
- type RadixDeploymentFilter
- type RadixDeploymentListMapper
- type Subject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSubjectToInformerEventAdapater ¶
func NewSubjectToInformerEventAdapater[T any](subject Subject[T]) cache.ResourceEventHandler
NewSubjectToInformerEventAdapater adapts a Subject to a cache.ResourceEventHandler that can be used with K8S informers as argument to informer.AddEventHandler(...)
Types ¶
type Filter ¶
type Filter[T any] struct { Predicate FilterPredicate[T] // contains filtered or unexported fields }
Filter implements Observer and Observable Objectes received by the filter's observer implementation is filtered with the Condition function before emitted by the filter's observable implementation
func (*Filter) AttachObserver ¶
func (o *Filter) AttachObserver(observer Observer[T])
func (*Filter) DetachObserver ¶
func (o *Filter) DetachObserver(observer Observer[T])
type FilterPredicate ¶
FilterPredicate defines the Filter method to be used with the Filter struct
type FilterPredicateFunc ¶
FilterPredicateFunc type is an adapter to allow the use of ordinary functions as FilterPredicate
type Observable ¶
type Observable[T any] interface { // AttachObserver registers an Observer that will receive values emitted by the Observable AttachObserver(observer Observer[T]) // AttachObserver un-registers an Observer from the Observable to stop it from receiving values DetachObserver(observer Observer[T]) }
Observable defines a type that can emit values to an Observer
type Observer ¶
type Observer[T any] interface { Receive(obj T) }
Observer defines an object that can be attached to an Observable
type RadixDeploymentContainerImageMapper ¶
type RadixDeploymentContainerImageMapper struct { KubeClient kubernetes.Interface // contains filtered or unexported fields }
RadixDeploymentContainerImageMapper receives RadixDeployments and emits images defined in jobs and componenets together with docker auths data to any observers
func (*RadixDeploymentContainerImageMapper) AttachObserver ¶
func (o *RadixDeploymentContainerImageMapper) AttachObserver(observer Observer[T])
func (*RadixDeploymentContainerImageMapper) DetachObserver ¶
func (o *RadixDeploymentContainerImageMapper) DetachObserver(observer Observer[T])
func (*RadixDeploymentContainerImageMapper) Receive ¶
func (m *RadixDeploymentContainerImageMapper) Receive(rd *v1.RadixDeployment)
type RadixDeploymentFilter ¶
type RadixDeploymentFilter struct { Filter[*v1.RadixDeployment] }
RadixDeploymentFilter defines a base for performing filtering on RadixDeployment objects
func ActiveRadixDeploymentFilter ¶
func ActiveRadixDeploymentFilter() *RadixDeploymentFilter
ActiveRadixDeploymentFilter creates a RadixDeploymentFilter that filters out any RadixDeployment that is not the active RD
func ExcludeRadixAppNamesFilter ¶
func ExcludeRadixAppNamesFilter(excludeAppNames []string) *RadixDeploymentFilter
ExcludeRadixAppNamesFilter creates a RadixDeploymentFilter that filters out any RadixDeployment belonging to applications specified in the excludeAppNames parameter
func (*RadixDeploymentFilter) AttachObserver ¶
func (o *RadixDeploymentFilter) AttachObserver(observer Observer[T])
func (*RadixDeploymentFilter) DetachObserver ¶
func (o *RadixDeploymentFilter) DetachObserver(observer Observer[T])
type RadixDeploymentListMapper ¶
type RadixDeploymentListMapper struct {
// contains filtered or unexported fields
}
RadixDeploymentListMapper receives slices of RadixDeployments and emits each RadixDeployments to any observers
func (*RadixDeploymentListMapper) AttachObserver ¶
func (o *RadixDeploymentListMapper) AttachObserver(observer Observer[T])
func (*RadixDeploymentListMapper) DetachObserver ¶
func (o *RadixDeploymentListMapper) DetachObserver(observer Observer[T])
func (*RadixDeploymentListMapper) Receive ¶
func (m *RadixDeploymentListMapper) Receive(rds []*v1.RadixDeployment)
type Subject ¶
type Subject[T any] interface { Observable[T] Next(T) }
Subject is a type of Observable that emits values to attached observers using the Next(T) method