Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EnvDisableMigration contains the name of the environment variable which can be used // to disable migration EnvDisableMigration = "MIGRATOR_DISABLE_MIGRATION" // EnvHostLocalStorePath contains the name of the environment variable which can be used to // change host local IPAM store path EnvHostLocalStorePath = "MIGRATOR_HOST_LOCAL_STORE" // DefaultHostLocalStorePath contains default path for host-local store which was used // in the older version DefaultHostLocalStorePath = "/var/lib/cni/nv-ipam/state/host-local" // PlaceholderForUnknownField contains placeholder string which will be used as a value // for fields for which we have no data PlaceholderForUnknownField = "MIGRATED_NO_DATA" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Migrator ¶
type Migrator interface { // Migrate execute migration logic. // The implementation will check if host-local IPAM data that were created by the previous version // of nv-ipam are available on the filesystem. If the data is found, // the migrator will read and save them into the store and then remove data in the old format. // Some information required by the new store schema can't be restored from the host-local IPAM store // format used in the older version of the nv-ipam. Missing data will be replaced by // a special placeholder which indicates that data is missing. Migrate(ctx context.Context) error }
Migrator is the interface implemented by migrator package
Click to show internal directories.
Click to hide internal directories.