Documentation ¶
Index ¶
- type Backup
- func (r *Backup) AddWatch(dsController controller.Controller) error
- func (r *Backup) Create(e event.CreateEvent) bool
- func (r *Backup) Delete(e event.DeleteEvent) bool
- func (r *Backup) Generic(e event.GenericEvent) bool
- func (r *Backup) GetDiscovered() ([]model.Model, error)
- func (r *Backup) GetStored() ([]model.Model, error)
- func (r *Backup) Reconcile() error
- func (r *Backup) Update(e event.UpdateEvent) bool
- type BaseCollection
- type Collection
- type Collections
- type Container
- func (r *Container) Add(cluster *migapi.MigCluster, collections ...Collection) error
- func (r *Container) Delete(cluster types.NamespacedName)
- func (r *Container) GetDs(cluster *model.Cluster) (*DataSource, bool)
- func (r *Container) HasCluster(cluster *model.Cluster) (bool, error)
- func (r *Container) Prune() error
- type DataSource
- func (r *DataSource) Create(m model.Model)
- func (r *DataSource) Delete(m model.Model)
- func (r *DataSource) HasDiscovered(m model.Model)
- func (r *DataSource) IsReady() bool
- func (r *DataSource) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (r *DataSource) Start(cluster *migapi.MigCluster) error
- func (r *DataSource) Stop(purge bool)
- func (r *DataSource) Update(m model.Model)
- type DirectImageMigration
- func (r *DirectImageMigration) AddWatch(dsController controller.Controller) error
- func (r *DirectImageMigration) Create(e event.CreateEvent) bool
- func (r *DirectImageMigration) Delete(e event.DeleteEvent) bool
- func (r *DirectImageMigration) Generic(e event.GenericEvent) bool
- func (r *DirectImageMigration) GetDiscovered() ([]model.Model, error)
- func (r *DirectImageMigration) GetStored() ([]model.Model, error)
- func (r *DirectImageMigration) Reconcile() error
- func (r *DirectImageMigration) Update(e event.UpdateEvent) bool
- type DirectImageStreamMigration
- func (r *DirectImageStreamMigration) AddWatch(dsController controller.Controller) error
- func (r *DirectImageStreamMigration) Create(e event.CreateEvent) bool
- func (r *DirectImageStreamMigration) Delete(e event.DeleteEvent) bool
- func (r *DirectImageStreamMigration) Generic(e event.GenericEvent) bool
- func (r *DirectImageStreamMigration) GetDiscovered() ([]model.Model, error)
- func (r *DirectImageStreamMigration) GetStored() ([]model.Model, error)
- func (r *DirectImageStreamMigration) Reconcile() error
- func (r *DirectImageStreamMigration) Update(e event.UpdateEvent) bool
- type DirectVolumeMigration
- func (r *DirectVolumeMigration) AddWatch(dsController controller.Controller) error
- func (r *DirectVolumeMigration) Create(e event.CreateEvent) bool
- func (r *DirectVolumeMigration) Delete(e event.DeleteEvent) bool
- func (r *DirectVolumeMigration) Generic(e event.GenericEvent) bool
- func (r *DirectVolumeMigration) GetDiscovered() ([]model.Model, error)
- func (r *DirectVolumeMigration) GetStored() ([]model.Model, error)
- func (r *DirectVolumeMigration) Reconcile() error
- func (r *DirectVolumeMigration) Update(e event.UpdateEvent) bool
- type DirectVolumeMigrationProgress
- func (r *DirectVolumeMigrationProgress) AddWatch(dsController controller.Controller) error
- func (r *DirectVolumeMigrationProgress) Create(e event.CreateEvent) bool
- func (r *DirectVolumeMigrationProgress) Delete(e event.DeleteEvent) bool
- func (r *DirectVolumeMigrationProgress) Generic(e event.GenericEvent) bool
- func (r *DirectVolumeMigrationProgress) GetDiscovered() ([]model.Model, error)
- func (r *DirectVolumeMigrationProgress) GetStored() ([]model.Model, error)
- func (r *DirectVolumeMigrationProgress) Reconcile() error
- func (r *DirectVolumeMigrationProgress) Update(e event.UpdateEvent) bool
- type Disposition
- type DsKey
- type Event
- func (r *Event) AddWatch(dsController controller.Controller) error
- func (r *Event) Create(e event.CreateEvent) bool
- func (r *Event) Delete(e event.DeleteEvent) bool
- func (r *Event) Generic(e event.GenericEvent) bool
- func (r *Event) GetDiscovered() ([]model.Model, error)
- func (r *Event) GetStored() ([]model.Model, error)
- func (r *Event) Reconcile() error
- func (r *Event) Update(e event.UpdateEvent) bool
- type Hook
- func (r *Hook) AddWatch(dsController controller.Controller) error
- func (r *Hook) Create(e event.CreateEvent) bool
- func (r *Hook) Delete(e event.DeleteEvent) bool
- func (r *Hook) Generic(e event.GenericEvent) bool
- func (r *Hook) GetDiscovered() ([]model.Model, error)
- func (r *Hook) GetStored() ([]model.Model, error)
- func (r *Hook) Reconcile() error
- func (r *Hook) Update(e event.UpdateEvent) bool
- type Job
- func (r *Job) AddWatch(dsController controller.Controller) error
- func (r *Job) Create(e event.CreateEvent) bool
- func (r *Job) Delete(e event.DeleteEvent) bool
- func (r *Job) Generic(e event.GenericEvent) bool
- func (r *Job) GetDiscovered() ([]model.Model, error)
- func (r *Job) GetStored() ([]model.Model, error)
- func (r *Job) Reconcile() error
- func (r *Job) Update(e event.UpdateEvent) bool
- type Migration
- func (r *Migration) AddWatch(dsController controller.Controller) error
- func (r *Migration) Create(e event.CreateEvent) bool
- func (r *Migration) Delete(e event.DeleteEvent) bool
- func (r *Migration) Generic(e event.GenericEvent) bool
- func (r *Migration) GetDiscovered() ([]model.Model, error)
- func (r *Migration) GetStored() ([]model.Model, error)
- func (r *Migration) Reconcile() error
- func (r *Migration) Update(e event.UpdateEvent) bool
- type ModelEvent
- type Namespace
- func (r *Namespace) AddWatch(dsController controller.Controller) error
- func (r *Namespace) Create(e event.CreateEvent) bool
- func (r *Namespace) Delete(e event.DeleteEvent) bool
- func (r *Namespace) Generic(e event.GenericEvent) bool
- func (r *Namespace) GetDiscovered() ([]model.Model, error)
- func (r *Namespace) GetStored() ([]model.Model, error)
- func (r *Namespace) Reconcile() error
- func (r *Namespace) Update(e event.UpdateEvent) bool
- type PV
- func (r *PV) AddWatch(dsController controller.Controller) error
- func (r *PV) Create(e event.CreateEvent) bool
- func (r *PV) Delete(e event.DeleteEvent) bool
- func (r *PV) Generic(e event.GenericEvent) bool
- func (r *PV) GetDiscovered() ([]model.Model, error)
- func (r *PV) GetStored() ([]model.Model, error)
- func (r *PV) Reconcile() error
- func (r *PV) Update(e event.UpdateEvent) bool
- type PVC
- func (r *PVC) AddWatch(dsController controller.Controller) error
- func (r *PVC) Create(e event.CreateEvent) bool
- func (r *PVC) Delete(e event.DeleteEvent) bool
- func (r *PVC) Generic(e event.GenericEvent) bool
- func (r *PVC) GetDiscovered() ([]model.Model, error)
- func (r *PVC) GetStored() ([]model.Model, error)
- func (r *PVC) Reconcile() error
- func (r *PVC) Update(e event.UpdateEvent) bool
- type Plan
- func (r *Plan) AddWatch(dsController controller.Controller) error
- func (r *Plan) Create(e event.CreateEvent) bool
- func (r *Plan) Delete(e event.DeleteEvent) bool
- func (r *Plan) Generic(e event.GenericEvent) bool
- func (r *Plan) GetDiscovered() ([]model.Model, error)
- func (r *Plan) GetStored() ([]model.Model, error)
- func (r *Plan) Reconcile() error
- func (r *Plan) Update(e event.UpdateEvent) bool
- type Pod
- func (r *Pod) AddWatch(dsController controller.Controller) error
- func (r *Pod) Create(e event.CreateEvent) bool
- func (r *Pod) Delete(e event.DeleteEvent) bool
- func (r *Pod) Generic(e event.GenericEvent) bool
- func (r *Pod) GetDiscovered() ([]model.Model, error)
- func (r *Pod) GetStored() ([]model.Model, error)
- func (r *Pod) Reconcile() error
- func (r *Pod) Update(e event.UpdateEvent) bool
- type PodVolumeBackup
- func (r *PodVolumeBackup) AddWatch(dsController controller.Controller) error
- func (r *PodVolumeBackup) Create(e event.CreateEvent) bool
- func (r *PodVolumeBackup) Delete(e event.DeleteEvent) bool
- func (r *PodVolumeBackup) Generic(e event.GenericEvent) bool
- func (r *PodVolumeBackup) GetDiscovered() ([]model.Model, error)
- func (r *PodVolumeBackup) GetStored() ([]model.Model, error)
- func (r *PodVolumeBackup) Reconcile() error
- func (r *PodVolumeBackup) Update(e event.UpdateEvent) bool
- type PodVolumeRestore
- func (r *PodVolumeRestore) AddWatch(dsController controller.Controller) error
- func (r *PodVolumeRestore) Create(e event.CreateEvent) bool
- func (r *PodVolumeRestore) Delete(e event.DeleteEvent) bool
- func (r *PodVolumeRestore) Generic(e event.GenericEvent) bool
- func (r *PodVolumeRestore) GetDiscovered() ([]model.Model, error)
- func (r *PodVolumeRestore) GetStored() ([]model.Model, error)
- func (r *PodVolumeRestore) Reconcile() error
- func (r *PodVolumeRestore) Update(e event.UpdateEvent) bool
- type Restore
- func (r *Restore) AddWatch(dsController controller.Controller) error
- func (r *Restore) Create(e event.CreateEvent) bool
- func (r *Restore) Delete(e event.DeleteEvent) bool
- func (r *Restore) Generic(e event.GenericEvent) bool
- func (r *Restore) GetDiscovered() ([]model.Model, error)
- func (r *Restore) GetStored() ([]model.Model, error)
- func (r *Restore) Reconcile() error
- func (r *Restore) Update(e event.UpdateEvent) bool
- type Route
- func (r *Route) AddWatch(dsController controller.Controller) error
- func (r *Route) Create(e event.CreateEvent) bool
- func (r *Route) Delete(e event.DeleteEvent) bool
- func (r *Route) Generic(e event.GenericEvent) bool
- func (r *Route) GetDiscovered() ([]model.Model, error)
- func (r *Route) GetStored() ([]model.Model, error)
- func (r *Route) Reconcile() error
- func (r *Route) Update(e event.UpdateEvent) bool
- type Service
- func (r *Service) AddWatch(dsController controller.Controller) error
- func (r *Service) Create(e event.CreateEvent) bool
- func (r *Service) Delete(e event.DeleteEvent) bool
- func (r *Service) Generic(e event.GenericEvent) bool
- func (r *Service) GetDiscovered() ([]model.Model, error)
- func (r *Service) GetStored() ([]model.Model, error)
- func (r *Service) Reconcile() error
- func (r *Service) Update(e event.UpdateEvent) bool
- type SimpleReconciler
- type StorageClass
- func (r *StorageClass) AddWatch(dsController controller.Controller) error
- func (r *StorageClass) Create(e event.CreateEvent) bool
- func (r *StorageClass) Delete(e event.DeleteEvent) bool
- func (r *StorageClass) Generic(e event.GenericEvent) bool
- func (r *StorageClass) GetDiscovered() ([]model.Model, error)
- func (r *StorageClass) GetStored() ([]model.Model, error)
- func (r *StorageClass) Reconcile() error
- func (r *StorageClass) Update(e event.UpdateEvent) bool
- type VirtualMachine
- func (r *VirtualMachine) AddWatch(dsController controller.Controller) error
- func (r *VirtualMachine) Create(e event.CreateEvent) bool
- func (r *VirtualMachine) Delete(e event.DeleteEvent) bool
- func (r *VirtualMachine) Generic(e event.GenericEvent) bool
- func (r *VirtualMachine) GetDiscovered() ([]model.Model, error)
- func (r *VirtualMachine) GetStored() ([]model.Model, error)
- func (r *VirtualMachine) Reconcile() error
- func (r *VirtualMachine) Update(e event.UpdateEvent) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backup ¶
type Backup struct { // Base BaseCollection }
A collection of k8s Backup resources.
func (*Backup) AddWatch ¶
func (r *Backup) AddWatch(dsController controller.Controller) error
type BaseCollection ¶
type BaseCollection struct {
// contains filtered or unexported fields
}
Base collection. Provides base fields and methods for collections.
func (*BaseCollection) GetDs ¶
func (r *BaseCollection) GetDs() *DataSource
Get the associated DataSource.
func (*BaseCollection) IsReady ¶
func (r *BaseCollection) IsReady() bool
Get whether the collection has reconciled.
func (*BaseCollection) Reset ¶
func (r *BaseCollection) Reset()
Reset `hasReconciled` and association with a DataSource.
type Collection ¶
type Collection interface { // Associate with a DataSource. // Mainly to support two phase construction. Bind(ds *DataSource) // Get the associated DataSource. GetDs() *DataSource // Add k8s watches. // Each watch MUST include a predicate that performs the // appropriate changes in the DB instead of creating // reconcile events. AddWatch(c controller.Controller) error // Reconcile the cluster and the DB. // Discover resources on the cluster modify the DB as needed. // Intended to be performed once when the collection is initialized. // The term is borrowed from k8s and similar but different. Reconcile() error // Get whether the collection is ready to be used. // Mainly, that it has been fully initialized (reconciled) and // protects against partial data sets. IsReady() bool // Reset the collection to a like-new state. // A reset collection is no longer ready and needs to be reconciled again. Reset() // Get a list of resources discovered on the cluster. // Intended to support `Reconcile()`. GetDiscovered() ([]model.Model, error) // Get a list of resources stored in the DB. // Intended to support `Reconcile()` GetStored() ([]model.Model, error) }
Collection of resources. Each collection loosely corresponds to a k8s resource and to a resource in the REST API. It is responsible for setting up watches; performing discovery and managing the inventory in the DB.
type Collections ¶
type Collections []Collection
type Container ¶
type Container struct { // A k8s client for the host cluster. Client client.Client // A database connection. Db *sql.DB // contains filtered or unexported fields }
Container of DataSources. Each DataSource corresponds to a MigCluster. The container is responsible for the lifecycle of DataSources based on add,update,delete of MigCluster.
func NewContainer ¶
Construct a new container.
func (*Container) Add ¶
func (r *Container) Add(cluster *migapi.MigCluster, collections ...Collection) error
Add a cluster to the container. Build/update a DataSource for the cluster as needed.
func (*Container) Delete ¶
func (r *Container) Delete(cluster types.NamespacedName)
Delete the DataSource for a deleted MigCluster.
func (*Container) GetDs ¶
func (r *Container) GetDs(cluster *model.Cluster) (*DataSource, bool)
Get the DataSource for a cluster.
func (*Container) HasCluster ¶
Determine of a MigCluster actually exists.
type DataSource ¶
type DataSource struct { // The associated (owner) container. Container *Container // Collections. Collections Collections // The REST configuration for the cluster. RestCfg *rest.Config // The k8s client for the cluster. Client client.Client // The corresponding cluster in the DB. Cluster model.Cluster // contains filtered or unexported fields }
A DataSource corresponds to a MigCluster and is responsible for maintaining a k8s:
- Manager/controller
- REST configuration
- Client
Each contains a set of `Collection`.
func (*DataSource) Create ¶
func (r *DataSource) Create(m model.Model)
Enqueue create model event. Used by watch predicates. Swallow panic: send on closed channel.
func (*DataSource) Delete ¶
func (r *DataSource) Delete(m model.Model)
Enqueue delete model event. Used by watch predicates. Swallow panic: send on closed channel.
func (*DataSource) HasDiscovered ¶
func (r *DataSource) HasDiscovered(m model.Model)
The specified model has been discovered. The `versionThreshold` will be updated as needed.
func (*DataSource) IsReady ¶
func (r *DataSource) IsReady() bool
Determine if the DataSource is `ready`. The DataSource is `ready` when all of the collections are `ready`.
func (*DataSource) Reconcile ¶
func (r *DataSource) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
The k8s reconcile loop. Implements the k8s Reconciler interface. The DataSource is the reconciler for the container k8s manager/controller but is should never be called. The design is for watches added by each collection reference a predicate that handles the change rather than queuing a reconcile event.
func (*DataSource) Start ¶
func (r *DataSource) Start(cluster *migapi.MigCluster) error
Start the DataSource.
- Create the cluster in the DB.
- Create a k8s client.
- Reconcile each collection.
func (*DataSource) Stop ¶
func (r *DataSource) Stop(purge bool)
Stop the DataSource. Stop the associated k8s manager/controller and delete all of the associated data in the DB. The data should be deleted when the DataSource is not being restarted.
func (*DataSource) Update ¶
func (r *DataSource) Update(m model.Model)
Enqueue update model event. Used by watch predicates. Swallow panic: send on closed channel.
type DirectImageMigration ¶
type DirectImageMigration struct { // Base BaseCollection }
A collection of k8s DirectImageMigration resources.
func (*DirectImageMigration) AddWatch ¶
func (r *DirectImageMigration) AddWatch(dsController controller.Controller) error
func (*DirectImageMigration) Create ¶
func (r *DirectImageMigration) Create(e event.CreateEvent) bool
func (*DirectImageMigration) Delete ¶
func (r *DirectImageMigration) Delete(e event.DeleteEvent) bool
func (*DirectImageMigration) Generic ¶
func (r *DirectImageMigration) Generic(e event.GenericEvent) bool
func (*DirectImageMigration) GetDiscovered ¶
func (r *DirectImageMigration) GetDiscovered() ([]model.Model, error)
func (*DirectImageMigration) GetStored ¶
func (r *DirectImageMigration) GetStored() ([]model.Model, error)
func (*DirectImageMigration) Reconcile ¶
func (r *DirectImageMigration) Reconcile() error
func (*DirectImageMigration) Update ¶
func (r *DirectImageMigration) Update(e event.UpdateEvent) bool
type DirectImageStreamMigration ¶
type DirectImageStreamMigration struct { // Base BaseCollection }
A collection of k8s DirectImageStreamMigration resources.
func (*DirectImageStreamMigration) AddWatch ¶
func (r *DirectImageStreamMigration) AddWatch(dsController controller.Controller) error
func (*DirectImageStreamMigration) Create ¶
func (r *DirectImageStreamMigration) Create(e event.CreateEvent) bool
func (*DirectImageStreamMigration) Delete ¶
func (r *DirectImageStreamMigration) Delete(e event.DeleteEvent) bool
func (*DirectImageStreamMigration) Generic ¶
func (r *DirectImageStreamMigration) Generic(e event.GenericEvent) bool
func (*DirectImageStreamMigration) GetDiscovered ¶
func (r *DirectImageStreamMigration) GetDiscovered() ([]model.Model, error)
func (*DirectImageStreamMigration) GetStored ¶
func (r *DirectImageStreamMigration) GetStored() ([]model.Model, error)
func (*DirectImageStreamMigration) Reconcile ¶
func (r *DirectImageStreamMigration) Reconcile() error
func (*DirectImageStreamMigration) Update ¶
func (r *DirectImageStreamMigration) Update(e event.UpdateEvent) bool
type DirectVolumeMigration ¶
type DirectVolumeMigration struct { // Base BaseCollection }
A collection of k8s DirectVolumeMigration resources.
func (*DirectVolumeMigration) AddWatch ¶
func (r *DirectVolumeMigration) AddWatch(dsController controller.Controller) error
func (*DirectVolumeMigration) Create ¶
func (r *DirectVolumeMigration) Create(e event.CreateEvent) bool
func (*DirectVolumeMigration) Delete ¶
func (r *DirectVolumeMigration) Delete(e event.DeleteEvent) bool
func (*DirectVolumeMigration) Generic ¶
func (r *DirectVolumeMigration) Generic(e event.GenericEvent) bool
func (*DirectVolumeMigration) GetDiscovered ¶
func (r *DirectVolumeMigration) GetDiscovered() ([]model.Model, error)
func (*DirectVolumeMigration) GetStored ¶
func (r *DirectVolumeMigration) GetStored() ([]model.Model, error)
func (*DirectVolumeMigration) Reconcile ¶
func (r *DirectVolumeMigration) Reconcile() error
func (*DirectVolumeMigration) Update ¶
func (r *DirectVolumeMigration) Update(e event.UpdateEvent) bool
type DirectVolumeMigrationProgress ¶
type DirectVolumeMigrationProgress struct { // Base BaseCollection }
A collection of k8s DirectVolumeMigrationProgress resources.
func (*DirectVolumeMigrationProgress) AddWatch ¶
func (r *DirectVolumeMigrationProgress) AddWatch(dsController controller.Controller) error
func (*DirectVolumeMigrationProgress) Create ¶
func (r *DirectVolumeMigrationProgress) Create(e event.CreateEvent) bool
func (*DirectVolumeMigrationProgress) Delete ¶
func (r *DirectVolumeMigrationProgress) Delete(e event.DeleteEvent) bool
func (*DirectVolumeMigrationProgress) Generic ¶
func (r *DirectVolumeMigrationProgress) Generic(e event.GenericEvent) bool
func (*DirectVolumeMigrationProgress) GetDiscovered ¶
func (r *DirectVolumeMigrationProgress) GetDiscovered() ([]model.Model, error)
func (*DirectVolumeMigrationProgress) GetStored ¶
func (r *DirectVolumeMigrationProgress) GetStored() ([]model.Model, error)
func (*DirectVolumeMigrationProgress) Reconcile ¶
func (r *DirectVolumeMigrationProgress) Reconcile() error
func (*DirectVolumeMigrationProgress) Update ¶
func (r *DirectVolumeMigrationProgress) Update(e event.UpdateEvent) bool
type Disposition ¶
type Disposition struct {
// contains filtered or unexported fields
}
Disposition. Used for collection reconcile and describes whether a resource has been `discovered` (exists on the cluster); Is `stored` in the inventory; or both. A `nil` pointer means that the resource does not exist.
type Event ¶
type Event struct { // Base BaseCollection }
A collection of k8s Event resources.
func (*Event) AddWatch ¶
func (r *Event) AddWatch(dsController controller.Controller) error
type Hook ¶
type Hook struct { // Base BaseCollection }
A collection of k8s Hook resources.
func (*Hook) AddWatch ¶
func (r *Hook) AddWatch(dsController controller.Controller) error
type Job ¶
type Job struct { // Base BaseCollection }
A collection of k8s Job resources.
func (*Job) AddWatch ¶
func (r *Job) AddWatch(dsController controller.Controller) error
type Migration ¶
type Migration struct { // Base BaseCollection }
A collection of k8s Migration resources.
func (*Migration) AddWatch ¶
func (r *Migration) AddWatch(dsController controller.Controller) error
type ModelEvent ¶
type ModelEvent struct {
// contains filtered or unexported fields
}
Model event. Used with `eventChannel`.
func (*ModelEvent) Apply ¶
func (r *ModelEvent) Apply(db *sql.DB, versionThreshold uint64) (err error)
Apply the change to the DB.
func (ModelEvent) Create ¶
func (r ModelEvent) Create(m model.Model) ModelEvent
Set the event model and action.
func (ModelEvent) Delete ¶
func (r ModelEvent) Delete(m model.Model) ModelEvent
Set the event model and action.
func (ModelEvent) Update ¶
func (r ModelEvent) Update(m model.Model) ModelEvent
Set the event model and action.
type Namespace ¶
type Namespace struct { // Base BaseCollection }
A collection of k8s Namespace resources.
func (*Namespace) AddWatch ¶
func (r *Namespace) AddWatch(dsController controller.Controller) error
type PV ¶
type PV struct { // Base BaseCollection }
A collection of k8s PV resources.
func (*PV) AddWatch ¶
func (r *PV) AddWatch(dsController controller.Controller) error
type PVC ¶
type PVC struct { // Base BaseCollection }
A collection of k8s PVC resources.
func (*PVC) AddWatch ¶
func (r *PVC) AddWatch(dsController controller.Controller) error
type Plan ¶
type Plan struct { // Base BaseCollection }
A collection of k8s Plan resources.
func (*Plan) AddWatch ¶
func (r *Plan) AddWatch(dsController controller.Controller) error
type Pod ¶
type Pod struct { // Base BaseCollection }
A collection of k8s Pod resources.
func (*Pod) AddWatch ¶
func (r *Pod) AddWatch(dsController controller.Controller) error
type PodVolumeBackup ¶
type PodVolumeBackup struct { // Base BaseCollection }
A collection of k8s PodVolumeBackup resources.
func (*PodVolumeBackup) AddWatch ¶
func (r *PodVolumeBackup) AddWatch(dsController controller.Controller) error
func (*PodVolumeBackup) Create ¶
func (r *PodVolumeBackup) Create(e event.CreateEvent) bool
func (*PodVolumeBackup) Delete ¶
func (r *PodVolumeBackup) Delete(e event.DeleteEvent) bool
func (*PodVolumeBackup) Generic ¶
func (r *PodVolumeBackup) Generic(e event.GenericEvent) bool
func (*PodVolumeBackup) GetDiscovered ¶
func (r *PodVolumeBackup) GetDiscovered() ([]model.Model, error)
func (*PodVolumeBackup) Reconcile ¶
func (r *PodVolumeBackup) Reconcile() error
func (*PodVolumeBackup) Update ¶
func (r *PodVolumeBackup) Update(e event.UpdateEvent) bool
type PodVolumeRestore ¶
type PodVolumeRestore struct { // Base BaseCollection }
A collection of k8s PodVolumeRestore resources.
func (*PodVolumeRestore) AddWatch ¶
func (r *PodVolumeRestore) AddWatch(dsController controller.Controller) error
func (*PodVolumeRestore) Create ¶
func (r *PodVolumeRestore) Create(e event.CreateEvent) bool
func (*PodVolumeRestore) Delete ¶
func (r *PodVolumeRestore) Delete(e event.DeleteEvent) bool
func (*PodVolumeRestore) Generic ¶
func (r *PodVolumeRestore) Generic(e event.GenericEvent) bool
func (*PodVolumeRestore) GetDiscovered ¶
func (r *PodVolumeRestore) GetDiscovered() ([]model.Model, error)
func (*PodVolumeRestore) Reconcile ¶
func (r *PodVolumeRestore) Reconcile() error
func (*PodVolumeRestore) Update ¶
func (r *PodVolumeRestore) Update(e event.UpdateEvent) bool
type Restore ¶
type Restore struct { // Base BaseCollection }
A collection of k8s Restore resources.
func (*Restore) AddWatch ¶
func (r *Restore) AddWatch(dsController controller.Controller) error
type Route ¶
type Route struct { // Base BaseCollection }
A collection of k8s Route resources.
func (*Route) AddWatch ¶
func (r *Route) AddWatch(dsController controller.Controller) error
type Service ¶
type Service struct { // Base BaseCollection }
A collection of k8s Service resources.
func (*Service) AddWatch ¶
func (r *Service) AddWatch(dsController controller.Controller) error
type SimpleReconciler ¶
A basic Reconciler. The term is borrowed from k8s and is similar but different. Using the `GetDiscovered()` and `GetStored()` methods, a disposition is constructed and used to update the DB.
func (*SimpleReconciler) Reconcile ¶
func (r *SimpleReconciler) Reconcile(collection Collection) (err error)
Reconcile the resources on the cluster and the collection in the DB. Using the `GetDiscovered()` and `GetStored()` methods, a disposition is constructed and used to update the DB.
type StorageClass ¶
type StorageClass struct { // Base BaseCollection }
A collection of k8s StorageClass resources.
func (*StorageClass) AddWatch ¶
func (r *StorageClass) AddWatch(dsController controller.Controller) error
func (*StorageClass) Create ¶
func (r *StorageClass) Create(e event.CreateEvent) bool
func (*StorageClass) Delete ¶
func (r *StorageClass) Delete(e event.DeleteEvent) bool
func (*StorageClass) Generic ¶
func (r *StorageClass) Generic(e event.GenericEvent) bool
func (*StorageClass) GetDiscovered ¶
func (r *StorageClass) GetDiscovered() ([]model.Model, error)
func (*StorageClass) Reconcile ¶
func (r *StorageClass) Reconcile() error
func (*StorageClass) Update ¶
func (r *StorageClass) Update(e event.UpdateEvent) bool
type VirtualMachine ¶
type VirtualMachine struct { // Base BaseCollection }
A collection of k8s VirtualMachine resources.
func (*VirtualMachine) AddWatch ¶
func (r *VirtualMachine) AddWatch(dsController controller.Controller) error
func (*VirtualMachine) Create ¶
func (r *VirtualMachine) Create(e event.CreateEvent) bool
func (*VirtualMachine) Delete ¶
func (r *VirtualMachine) Delete(e event.DeleteEvent) bool
func (*VirtualMachine) Generic ¶
func (r *VirtualMachine) Generic(e event.GenericEvent) bool
func (*VirtualMachine) GetDiscovered ¶
func (r *VirtualMachine) GetDiscovered() ([]model.Model, error)
func (*VirtualMachine) Reconcile ¶
func (r *VirtualMachine) Reconcile() error
func (*VirtualMachine) Update ¶
func (r *VirtualMachine) Update(e event.UpdateEvent) bool