Documentation ¶
Index ¶
- Constants
- type BaseCollection
- type Cluster
- type Collection
- type Collector
- func (r *Collector) Client() client.Client
- func (r *Collector) Create(m libmodel.Model)
- func (r *Collector) DB() libmodel.DB
- func (r *Collector) Delete(m libmodel.Model)
- func (r *Collector) HasParity() bool
- func (r *Collector) Name() string
- func (r *Collector) Owner() meta.Object
- func (r *Collector) Reconcile(request reconcile.Request) (reconcile.Result, error)
- func (r *Collector) Reset()
- func (r *Collector) Shutdown()
- func (r *Collector) Start() error
- func (r *Collector) Test() error
- func (r *Collector) Update(m libmodel.Model)
- func (r *Collector) UpdateThreshold(m libmodel.Model)
- type ModelEvent
Constants ¶
View Source
const (
RetryDelay = time.Second * 5
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCollection ¶
type BaseCollection struct { // Associated data collector. Collector *Collector }
Base collection.
func (*BaseCollection) Bind ¶
func (r *BaseCollection) Bind(collector *Collector)
Associate with a collector.
type Cluster ¶
type Cluster interface { meta.Object // Build the REST configuration // for the remote cluster. RestCfg(*core.Secret) *rest.Config }
Cluster.
type Collection ¶
type Collection interface { predicate.Predicate // Bind to a collector. Bind(*Collector) // Get kubernetes resource object. Object() runtime.Object // Initial reconcile. Reconcile(context.Context) error }
Resource collection.
type Collector ¶ added in v0.6.0
type Collector struct {
// contains filtered or unexported fields
}
An OpenShift collector.
func New ¶
func New( db libmodel.DB, cluster Cluster, secret *core.Secret, collections ...Collection) *Collector
New collector.
func (*Collector) Create ¶ added in v0.6.0
Enqueue create model event. Used by watch predicates. Swallow panic: send on closed channel.
func (*Collector) Delete ¶ added in v0.6.0
Enqueue delete model event. Used by watch predicates. Swallow panic: send on closed channel.
func (*Collector) Shutdown ¶ added in v0.6.0
func (r *Collector) Shutdown()
Shutdown the collector.
- Close manager stop channel.
- Close watch event coroutine channel.
- Cancel the context.
func (*Collector) Update ¶ added in v0.6.0
Enqueue update model event. Used by watch predicates. Swallow panic: send on closed channel.
func (*Collector) UpdateThreshold ¶ added in v0.6.0
Update the versionThreshold
type ModelEvent ¶
type ModelEvent struct {
// contains filtered or unexported fields
}
Model event. Used with `eventChannel`.
func (*ModelEvent) Apply ¶
func (r *ModelEvent) Apply(rl *Collector) (err error)
Apply the change to the DB.
func (ModelEvent) Create ¶
func (r ModelEvent) Create(m libmodel.Model) ModelEvent
Set the event model and action.
func (ModelEvent) Delete ¶
func (r ModelEvent) Delete(m libmodel.Model) ModelEvent
Set the event model and action.
func (ModelEvent) Update ¶
func (r ModelEvent) Update(m libmodel.Model) ModelEvent
Set the event model and action.
Click to show internal directories.
Click to hide internal directories.