Documentation ¶
Index ¶
- type ErrNotRetriable
- type ErrRetriable
- type InProcessMigrator
- func (m *InProcessMigrator) AddEventHandler(handler cache.ResourceEventHandler) []cache.InformerSynced
- func (m *InProcessMigrator) EnsureMigration(gr schema.GroupResource, writeKey string) (finished bool, result error, err error)
- func (m *InProcessMigrator) PruneMigration(gr schema.GroupResource) error
- type KubeStorageVersionMigrator
- func (m *KubeStorageVersionMigrator) AddEventHandler(handler cache.ResourceEventHandler) []cache.InformerSynced
- func (m *KubeStorageVersionMigrator) EnsureMigration(gr schema.GroupResource, writeKey string) (finished bool, result error, err error)
- func (m *KubeStorageVersionMigrator) PruneMigration(gr schema.GroupResource) error
- type Migrator
- type TemporaryError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrNotRetriable ¶
type ErrNotRetriable struct {
// contains filtered or unexported fields
}
ErrNotRetriable is a wrapper for an error that a migrator may use to indicate the specific error cannot be retried.
func (ErrNotRetriable) Temporary ¶
func (ErrNotRetriable) Temporary() bool
type ErrRetriable ¶
type ErrRetriable struct {
// contains filtered or unexported fields
}
ErrRetriable is a wrapper for an error that a migrator may use to indicate the specific error can be retried.
func (ErrRetriable) Temporary ¶
func (ErrRetriable) Temporary() bool
type InProcessMigrator ¶
type InProcessMigrator struct {
// contains filtered or unexported fields
}
InProcessMigrator runs migration in-process using paging.
func NewInProcessMigrator ¶
func NewInProcessMigrator(dynamicClient dynamic.Interface, discoveryClient discovery.ServerResourcesInterface) *InProcessMigrator
func (*InProcessMigrator) AddEventHandler ¶
func (m *InProcessMigrator) AddEventHandler(handler cache.ResourceEventHandler) []cache.InformerSynced
func (*InProcessMigrator) EnsureMigration ¶
func (m *InProcessMigrator) EnsureMigration(gr schema.GroupResource, writeKey string) (finished bool, result error, err error)
func (*InProcessMigrator) PruneMigration ¶
func (m *InProcessMigrator) PruneMigration(gr schema.GroupResource) error
type KubeStorageVersionMigrator ¶
type KubeStorageVersionMigrator struct {
// contains filtered or unexported fields
}
KubeStorageVersionMigrator runs migration through the kube-storage-version-migrator components, driven by CustomResources.
func NewKubeStorageVersionMigrator ¶
func NewKubeStorageVersionMigrator(client kubemigratorclient.Interface, informer migrationv1alpha1informer.Interface, discoveryClient discovery.ServerResourcesInterface) *KubeStorageVersionMigrator
func (*KubeStorageVersionMigrator) AddEventHandler ¶
func (m *KubeStorageVersionMigrator) AddEventHandler(handler cache.ResourceEventHandler) []cache.InformerSynced
func (*KubeStorageVersionMigrator) EnsureMigration ¶
func (m *KubeStorageVersionMigrator) EnsureMigration(gr schema.GroupResource, writeKey string) (finished bool, result error, err error)
func (*KubeStorageVersionMigrator) PruneMigration ¶
func (m *KubeStorageVersionMigrator) PruneMigration(gr schema.GroupResource) error
type Migrator ¶
type Migrator interface { // EnsureMigration starts a migration if it does not exist. If a migration of // the same write-key exists and is finished (with or without error), nothing happens. // If a migration of another key exists, that migration is deleted first before // starting a new one. This function is idem-potent as long as a running or finished // migration is not pruned. // If finished is true, result is the result of the migration, with nil meaning that it // finished successfully. EnsureMigration(gr schema.GroupResource, writeKey string) (finished bool, result error, err error) // PruneMigration removes a migration, independently whether it is running or finished, // with error or not. If there is no migration, this must not return an error. PruneMigration(gr schema.GroupResource) error // AddEventHandler registers a event handler whenever the resources change // that might influence the result of Migrations(). AddEventHandler(handler cache.ResourceEventHandler) []cache.InformerSynced }
Migrator is a resource migration mechanism.
type TemporaryError ¶
type TemporaryError interface { error // Temporary should return true if this is a temporary error Temporary() bool }
TemporaryError is a wrapper interface that is used to determine if an error can be retried.
Click to show internal directories.
Click to hide internal directories.