Documentation
¶
Index ¶
- Constants
- type BaseCollection
- type Cluster
- type Collection
- type ModelEvent
- type Reconciler
- func (r *Reconciler) Client() client.Client
- func (r *Reconciler) Create(m libmodel.Model)
- func (r *Reconciler) DB() libmodel.DB
- func (r *Reconciler) Delete(m libmodel.Model)
- func (r *Reconciler) HasParity() bool
- func (r *Reconciler) Name() string
- func (r *Reconciler) Owner() meta.Object
- func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error)
- func (r *Reconciler) Reset()
- func (r *Reconciler) Shutdown()
- func (r *Reconciler) Start() error
- func (r *Reconciler) Test() error
- func (r *Reconciler) Update(m libmodel.Model)
- func (r *Reconciler) UpdateThreshold(m libmodel.Model)
Constants ¶
const (
RetryDelay = time.Second * 5
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCollection ¶
type BaseCollection struct { // Associated data reconciler. Reconciler *Reconciler }
Base collection.
func (*BaseCollection) Bind ¶
func (r *BaseCollection) Bind(reconciler *Reconciler)
Associate with a reconciler.
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 reconciler. Bind(*Reconciler) // Get kubernetes resource object. Object() runtime.Object // Initial reconcile. Reconcile(context.Context) error }
Resource collection.
type ModelEvent ¶
type ModelEvent struct {
// contains filtered or unexported fields
}
Model event. Used with `eventChannel`.
func (*ModelEvent) Apply ¶
func (r *ModelEvent) Apply(rl *Reconciler) (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.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
An OpenShift reconciler.
func New ¶
func New( db libmodel.DB, cluster Cluster, secret *core.Secret, collections ...Collection) *Reconciler
New reconciler.
func (*Reconciler) Create ¶
func (r *Reconciler) Create(m libmodel.Model)
Enqueue create model event. Used by watch predicates. Swallow panic: send on closed channel.
func (*Reconciler) Delete ¶
func (r *Reconciler) Delete(m libmodel.Model)
Enqueue delete model event. Used by watch predicates. Swallow panic: send on closed channel.
func (*Reconciler) HasParity ¶ added in v0.2.9
func (r *Reconciler) HasParity() bool
Reconciler has achieved parity.
func (*Reconciler) Shutdown ¶
func (r *Reconciler) Shutdown()
Shutdown the reconciler.
- Close manager stop channel.
- Close watch event coroutine channel.
- Cancel the context.
func (*Reconciler) Test ¶ added in v0.2.8
func (r *Reconciler) Test() error
Test connection with credentials.
func (*Reconciler) Update ¶
func (r *Reconciler) Update(m libmodel.Model)
Enqueue update model event. Used by watch predicates. Swallow panic: send on closed channel.
func (*Reconciler) UpdateThreshold ¶
func (r *Reconciler) UpdateThreshold(m libmodel.Model)
Update the versionThreshold