Documentation ¶
Index ¶
- Constants
- func RedirectInstanceConfig(new, old string) error
- type CompatDaemon
- type DaemonRafsStore
- func (s *DaemonRafsStore) AddDaemon(d *daemon.Daemon) error
- func (s *DaemonRafsStore) AddRafsInstance(r *rafs.Rafs) error
- func (s *DaemonRafsStore) CleanupDaemons(ctx context.Context) error
- func (s *DaemonRafsStore) DeleteDaemon(id string) error
- func (s *DaemonRafsStore) DeleteRafsInstance(snapshotID string) error
- func (s *DaemonRafsStore) NextInstanceSeq() (uint64, error)
- func (s *DaemonRafsStore) UpdateDaemon(d *daemon.Daemon) error
- func (s *DaemonRafsStore) WalkDaemons(ctx context.Context, cb func(d *daemon.ConfigState) error) error
- func (s *DaemonRafsStore) WalkRafsInstances(ctx context.Context, cb func(*rafs.Rafs) error) error
- type Database
- func (db *Database) AddRafsInstance(_ context.Context, instance *rafs.Rafs) error
- func (db *Database) CleanupDaemons(_ context.Context) error
- func (db *Database) Close() error
- func (db *Database) DeleteDaemon(_ context.Context, id string) error
- func (db *Database) DeleteRafsInstance(_ context.Context, snapshotID string) error
- func (db *Database) NextInstanceSeq() (uint64, error)
- func (db *Database) SaveDaemon(_ context.Context, d *daemon.Daemon) error
- func (db *Database) UpdateDaemon(_ context.Context, d *daemon.Daemon) error
- func (db *Database) WalkCompatDaemons(_ context.Context, handler func(cd *CompatDaemon) error) error
- func (db *Database) WalkDaemons(_ context.Context, cb func(info *daemon.ConfigState) error) error
- func (db *Database) WalkRafsInstances(_ context.Context, cb func(r *rafs.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 DaemonRafsStore ¶ added in v0.12.0
type DaemonRafsStore struct {
// contains filtered or unexported fields
}
func NewDaemonRafsStore ¶ added in v0.12.0
func NewDaemonRafsStore(db *Database) (*DaemonRafsStore, error)
func (*DaemonRafsStore) AddDaemon ¶ added in v0.12.0
func (s *DaemonRafsStore) AddDaemon(d *daemon.Daemon) error
If the daemon is inserted to DB before, return error ErrAlreadyExisted.
func (*DaemonRafsStore) AddRafsInstance ¶ added in v0.12.0
func (s *DaemonRafsStore) AddRafsInstance(r *rafs.Rafs) error
func (*DaemonRafsStore) CleanupDaemons ¶ added in v0.12.0
func (s *DaemonRafsStore) CleanupDaemons(ctx context.Context) error
func (*DaemonRafsStore) DeleteDaemon ¶ added in v0.12.0
func (s *DaemonRafsStore) DeleteDaemon(id string) error
func (*DaemonRafsStore) DeleteRafsInstance ¶ added in v0.12.0
func (s *DaemonRafsStore) DeleteRafsInstance(snapshotID string) error
func (*DaemonRafsStore) NextInstanceSeq ¶ added in v0.12.0
func (s *DaemonRafsStore) NextInstanceSeq() (uint64, error)
func (*DaemonRafsStore) UpdateDaemon ¶ added in v0.12.0
func (s *DaemonRafsStore) UpdateDaemon(d *daemon.Daemon) error
func (*DaemonRafsStore) WalkDaemons ¶ added in v0.12.0
func (s *DaemonRafsStore) WalkDaemons(ctx context.Context, cb func(d *daemon.ConfigState) error) error
func (*DaemonRafsStore) WalkRafsInstances ¶ added in v0.12.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) AddRafsInstance ¶ added in v0.12.0
func (*Database) CleanupDaemons ¶
Cleanup deletes all daemon records
func (*Database) DeleteDaemon ¶
func (*Database) DeleteRafsInstance ¶ added in v0.12.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.