Documentation ¶
Index ¶
- Variables
- type Collector
- func (r *Collector) GetUpdateChan() chan struct{}
- func (r *Collector) IsRunning() bool
- func (r *Collector) SetPort(port uint)
- func (r *Collector) Start(ctx context.Context, req *sdcpb.CreateDataStoreRequest) error
- func (r *Collector) StartSubscription(ctx context.Context)
- func (r *Collector) Stop(ctx context.Context)
- func (r *Collector) StopSubscription(ctx context.Context)
- type Context
- func (r *Context) CreateDS(ctx context.Context, datastoreReq *sdcpb.CreateDataStoreRequest) error
- func (r *Context) DeleteDS(ctx context.Context) error
- func (r *Context) DeleteIntent(ctx context.Context, key storebackend.Key, config *config.Config, dryRun bool) (*config.Config, error)
- func (r *Context) DeleteSubscription(ctx context.Context, sub *invv1alpha1.Subscription) error
- func (r *Context) GetAddress() string
- func (r *Context) GetCache() cache.Cache
- func (r *Context) GetData(ctx context.Context, key storebackend.Key) (*config.RunningConfig, error)
- func (r *Context) GetDataStore(ctx context.Context, in *sdcpb.GetDataStoreRequest, opts ...grpc.CallOption) (*sdcpb.GetDataStoreResponse, error)
- func (r *Context) GetPrombLabels() []prompb.Label
- func (r *Context) GetSchema() *config.ConfigStatusLastKnownGoodSchema
- func (r *Context) IsReady() bool
- func (r *Context) SetIntent(ctx context.Context, key storebackend.Key, config *config.Config, ...) (*config.Config, error)
- func (r *Context) SetNotReady(ctx context.Context)
- func (r *Context) SetReady(ctx context.Context)
- func (r *Context) UpsertSubscription(ctx context.Context, sub *invv1alpha1.Subscription) error
- type DeviationWatcher
- type Path
- type PathSubscriptions
- type Subscription
- type Subscriptions
- type TargetHandler
- func (r *TargetHandler) DeleteIntent(ctx context.Context, targetKey types.NamespacedName, config *config.Config, ...) (*config.Config, error)
- func (r *TargetHandler) GetData(ctx context.Context, targetKey types.NamespacedName) (*config.RunningConfig, error)
- func (r *TargetHandler) GetTargetContext(ctx context.Context, targetKey types.NamespacedName) (*invv1alpha1.Target, *Context, error)
- func (r *TargetHandler) SetIntent(ctx context.Context, targetKey types.NamespacedName, config *config.Config, ...) (*config.Config, *config.ConfigStatusLastKnownGoodSchema, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var LookupError = errors.New("target lookup error")
Functions ¶
This section is empty.
Types ¶
type Collector ¶ added in v0.0.44
type Collector struct {
// contains filtered or unexported fields
}
func NewCollector ¶ added in v0.0.44
func NewCollector(targetKey storebackend.Key, subscriptions *Subscriptions) *Collector
func (*Collector) GetUpdateChan ¶ added in v0.0.44
func (r *Collector) GetUpdateChan() chan struct{}
func (*Collector) StartSubscription ¶ added in v0.0.44
func (*Collector) StopSubscription ¶ added in v0.0.44
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) DeleteIntent ¶
func (*Context) DeleteSubscription ¶ added in v0.0.44
func (r *Context) DeleteSubscription(ctx context.Context, sub *invv1alpha1.Subscription) error
func (*Context) GetAddress ¶
func (*Context) GetData ¶
func (r *Context) GetData(ctx context.Context, key storebackend.Key) (*config.RunningConfig, error)
func (*Context) GetDataStore ¶
func (r *Context) GetDataStore(ctx context.Context, in *sdcpb.GetDataStoreRequest, opts ...grpc.CallOption) (*sdcpb.GetDataStoreResponse, error)
func (*Context) GetPrombLabels ¶ added in v0.0.44
func (*Context) GetSchema ¶
func (r *Context) GetSchema() *config.ConfigStatusLastKnownGoodSchema
func (*Context) SetNotReady ¶ added in v0.0.43
func (*Context) UpsertSubscription ¶ added in v0.0.44
func (r *Context) UpsertSubscription(ctx context.Context, sub *invv1alpha1.Subscription) error
type DeviationWatcher ¶
type DeviationWatcher struct {
// contains filtered or unexported fields
}
func NewDeviationWatcher ¶
func NewDeviationWatcher(targetKey storebackend.Key, client client.Client, dsclient dsclient.Client) *DeviationWatcher
func (*DeviationWatcher) Start ¶
func (r *DeviationWatcher) Start(ctx context.Context)
func (*DeviationWatcher) Stop ¶
func (r *DeviationWatcher) Stop(ctx context.Context)
type PathSubscriptions ¶ added in v0.0.44
type PathSubscriptions struct { Current *Subscription // AllSubscriptions list all the subscriptions that are in the system, the key is name of the subscription CR AllSubscriptions map[string]*Subscription }
type Subscription ¶ added in v0.0.44
type Subscriptions ¶ added in v0.0.44
type Subscriptions struct {
Paths store.Storer[*PathSubscriptions]
}
func NewSubscriptions ¶ added in v0.0.44
func NewSubscriptions() *Subscriptions
func (*Subscriptions) AddSubscription ¶ added in v0.0.44
func (r *Subscriptions) AddSubscription(subscription *invv1alpha1.Subscription) error
Add or update a subscription
func (*Subscriptions) DelSubscription ¶ added in v0.0.44
func (r *Subscriptions) DelSubscription(subscription *invv1alpha1.Subscription) error
func (*Subscriptions) GetPaths ¶ added in v0.0.44
func (r *Subscriptions) GetPaths() map[invv1alpha1.Encoding][]Path
func (*Subscriptions) HasSubscriptions ¶ added in v0.0.44
func (r *Subscriptions) HasSubscriptions() bool
type TargetHandler ¶ added in v0.0.27
type TargetHandler struct {
// contains filtered or unexported fields
}
func NewTargetHandler ¶ added in v0.0.27
func NewTargetHandler(client client.Client, targetStore storebackend.Storer[*Context]) *TargetHandler
func (*TargetHandler) DeleteIntent ¶ added in v0.0.27
func (*TargetHandler) GetData ¶ added in v0.0.27
func (r *TargetHandler) GetData(ctx context.Context, targetKey types.NamespacedName) (*config.RunningConfig, error)
func (*TargetHandler) GetTargetContext ¶ added in v0.0.27
func (r *TargetHandler) GetTargetContext(ctx context.Context, targetKey types.NamespacedName) (*invv1alpha1.Target, *Context, error)
GetTargetContext returns a invTarget and targetContext when the target is ready and the ctx is found
func (*TargetHandler) SetIntent ¶ added in v0.0.27
func (r *TargetHandler) SetIntent(ctx context.Context, targetKey types.NamespacedName, config *config.Config, useSpec, dryRun bool) (*config.Config, *config.ConfigStatusLastKnownGoodSchema, error)
Click to show internal directories.
Click to hide internal directories.