Documentation ¶
Index ¶
- Constants
- func RedirectInstanceConfig(new, old string) error
- type CompatDaemon
- type DaemonStore
- func (s *DaemonStore) AddDaemon(d *daemon.Daemon) error
- func (s *DaemonStore) AddInstance(r *daemon.Rafs) error
- func (s *DaemonStore) CleanupDaemons(ctx context.Context) error
- func (s *DaemonStore) DeleteDaemon(id string) error
- func (s *DaemonStore) DeleteInstance(snapshotID string) error
- func (s *DaemonStore) NextInstanceSeq() (uint64, error)
- func (s *DaemonStore) UpdateDaemon(d *daemon.Daemon) error
- func (s *DaemonStore) WalkDaemons(ctx context.Context, cb func(d *daemon.States) error) error
- func (s *DaemonStore) WalkInstances(ctx context.Context, cb func(*daemon.Rafs) error) error
- type Database
- func (db *Database) AddInstance(ctx context.Context, instance *daemon.Rafs) error
- func (db *Database) CleanupDaemons(ctx context.Context) error
- func (db *Database) Close() error
- func (db *Database) DeleteDaemon(ctx context.Context, id string) error
- func (db *Database) DeleteInstance(ctx context.Context, snapshotID string) error
- func (db *Database) NextInstanceSeq() (uint64, error)
- func (db *Database) SaveDaemon(ctx context.Context, d *daemon.Daemon) error
- func (db *Database) UpdateDaemon(ctx context.Context, d *daemon.Daemon) error
- func (db *Database) WalkCompatDaemons(ctx context.Context, handler func(cd *CompatDaemon) error) error
- func (db *Database) WalkDaemons(ctx context.Context, cb func(info *daemon.States) error) error
- func (db *Database) WalkInstances(ctx context.Context, cb func(r *daemon.Rafs) error) error
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func RedirectInstanceConfig ¶ added in v0.4.1
Snapshotter v0.3.0 and lower store nydusd and rafs instance configurations in the different folders.
Types ¶
type CompatDaemon ¶ added in v0.4.0
type DaemonStore ¶
type DaemonStore struct {
// contains filtered or unexported fields
}
func NewDaemonStore ¶
func NewDaemonStore(db *Database) (*DaemonStore, error)
func (*DaemonStore) AddDaemon ¶ added in v0.4.0
func (s *DaemonStore) AddDaemon(d *daemon.Daemon) error
If the daemon is inserted to DB before, return error ErrAlreadyExisted.
func (*DaemonStore) AddInstance ¶ added in v0.4.0
func (s *DaemonStore) AddInstance(r *daemon.Rafs) error
func (*DaemonStore) CleanupDaemons ¶
func (s *DaemonStore) CleanupDaemons(ctx context.Context) error
func (*DaemonStore) DeleteDaemon ¶ added in v0.4.0
func (s *DaemonStore) DeleteDaemon(id string) error
func (*DaemonStore) DeleteInstance ¶ added in v0.4.0
func (s *DaemonStore) DeleteInstance(snapshotID string) error
func (*DaemonStore) NextInstanceSeq ¶ added in v0.4.0
func (s *DaemonStore) NextInstanceSeq() (uint64, error)
func (*DaemonStore) UpdateDaemon ¶ added in v0.4.0
func (s *DaemonStore) UpdateDaemon(d *daemon.Daemon) error
func (*DaemonStore) WalkDaemons ¶
func (*DaemonStore) WalkInstances ¶ added in v0.4.0
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database keeps infos that need to survive among snapshotter restart
func NewDatabase ¶
NewDatabase creates a new or open existing database file
func (*Database) AddInstance ¶ added in v0.4.0
func (*Database) CleanupDaemons ¶
Cleanup deletes all daemon records
func (*Database) DeleteDaemon ¶
func (*Database) DeleteInstance ¶ added in v0.4.0
func (*Database) NextInstanceSeq ¶ added in v0.4.0
func (*Database) SaveDaemon ¶
func (*Database) UpdateDaemon ¶
func (*Database) WalkCompatDaemons ¶ added in v0.4.0
func (*Database) WalkDaemons ¶
Click to show internal directories.
Click to hide internal directories.