Documentation ¶
Index ¶
- func ContainerVolumeRefsCount(c *pouch.PouchContainer, volumeRefs map[string]string) error
- type Migrator
- type PouchMigrator
- func (p *PouchMigrator) Cleanup() error
- func (p *PouchMigrator) Migrate(ctx context.Context, takeOverContainer bool) error
- func (p *PouchMigrator) PostMigrate(ctx context.Context, takeOverContainer bool) error
- func (p *PouchMigrator) PreMigrate(ctx context.Context, takeOverContainer bool) error
- func (p *PouchMigrator) PrepareImages(ctx context.Context) error
- func (p *PouchMigrator) RevertMigration(ctx context.Context, takeOverContainer bool) error
- type Store
- type UpperDirMapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerVolumeRefsCount ¶
func ContainerVolumeRefsCount(c *pouch.PouchContainer, volumeRefs map[string]string) error
ContainerVolumeRefsCount count a container's reference to volumes
Types ¶
type Migrator ¶
type Migrator interface { // PreMigrate do something before migration PreMigrate(ctx context.Context, takeOverContainer bool) error // Migrate does migrate action Migrate(ctx context.Context, takeOverContainer bool) error // PostMigrate do something after migration PostMigrate(ctx context.Context, takeOverContainer bool) error // RevertMigration reverts migration RevertMigration(ctx context.Context, takeOverContainer bool) error // Cleanup does some clean works when migrator exited Cleanup() error // PrepareImages just pull images for containers PrepareImages(ctx context.Context) error }
Migrator is an interface to migrate docker containers to other containers
type PouchMigrator ¶
type PouchMigrator struct {
// contains filtered or unexported fields
}
PouchMigrator is a tool to migrate docker containers to pouch containers
func (*PouchMigrator) Cleanup ¶
func (p *PouchMigrator) Cleanup() error
Cleanup does some clean works when migrator exited.
func (*PouchMigrator) Migrate ¶
func (p *PouchMigrator) Migrate(ctx context.Context, takeOverContainer bool) error
Migrate migrates docker containers to pouch containers: * stop all docker containers * mv oldUpperDir/* newUpperDir/
func (*PouchMigrator) PostMigrate ¶
func (p *PouchMigrator) PostMigrate(ctx context.Context, takeOverContainer bool) error
PostMigrate does something after migration.
func (*PouchMigrator) PreMigrate ¶
func (p *PouchMigrator) PreMigrate(ctx context.Context, takeOverContainer bool) error
PreMigrate prepares things for migration * pull image to pouch * create snapshot for container * set snapshot upperDir, workDir diskquota * convert docker container metaJSON to pouch container metaJSON
func (*PouchMigrator) PrepareImages ¶
func (p *PouchMigrator) PrepareImages(ctx context.Context) error
PrepareImages just pull images for containers
func (*PouchMigrator) RevertMigration ¶
func (p *PouchMigrator) RevertMigration(ctx context.Context, takeOverContainer bool) error
RevertMigration reverts migration.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a store of volume
func (*Store) CreateVolumes ¶
func (s *Store) CreateVolumes(volumes []*volumetypes.Volume) error
CreateVolumes put all volumes information to volume boltdb
type UpperDirMapping ¶
type UpperDirMapping struct {
// contains filtered or unexported fields
}
UpperDirMapping stores overlayfs upperDir map for docker and pouch.