Documentation ¶
Index ¶
- Variables
- type Blob
- type CacheStore
- type DaemonStore
- func (s *DaemonStore) Add(d *daemon.Daemon) error
- func (s *DaemonStore) CleanupDaemons(ctx context.Context) error
- func (s *DaemonStore) Delete(d *daemon.Daemon) error
- func (s *DaemonStore) Get(id string) (*daemon.Daemon, error)
- func (s *DaemonStore) GetBySnapshot(snapshotID string) (*daemon.Daemon, error)
- func (s *DaemonStore) List() []*daemon.Daemon
- func (s *DaemonStore) Size() int
- func (s *DaemonStore) Update(d *daemon.Daemon) error
- func (s *DaemonStore) WalkDaemons(ctx context.Context, cb func(d *daemon.Daemon) error) error
- type Database
- func (d *Database) CleanupDaemons(ctx context.Context) error
- func (d *Database) Close() error
- func (d *Database) DeleteDaemon(ctx context.Context, id string) error
- func (d *Database) SaveDaemon(ctx context.Context, dmn *daemon.Daemon) error
- func (d *Database) UpdateDaemon(ctx context.Context, dmn *daemon.Daemon) error
- func (d *Database) WalkDaemons(ctx context.Context, cb func(info *daemon.Daemon) error) error
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound errors when the querying object not exists ErrNotFound = errors.New("object not found") // ErrAlreadyExists errors when duplicated object found ErrAlreadyExists = errors.New("object already exists") )
Functions ¶
This section is empty.
Types ¶
type CacheStore ¶
func NewCacheStore ¶
func NewCacheStore(db *Database) (*CacheStore, error)
func (*CacheStore) AddSnapshot ¶
func (cs *CacheStore) AddSnapshot(imageID string, blobs []string) error
func (*CacheStore) DelSnapshot ¶
func (cs *CacheStore) DelSnapshot(imageID string) error
type DaemonStore ¶
func NewDaemonStore ¶
func NewDaemonStore(db *Database) (*DaemonStore, error)
func (*DaemonStore) CleanupDaemons ¶
func (s *DaemonStore) CleanupDaemons(ctx context.Context) error
func (*DaemonStore) GetBySnapshot ¶
func (s *DaemonStore) GetBySnapshot(snapshotID string) (*daemon.Daemon, error)
func (*DaemonStore) List ¶
func (s *DaemonStore) List() []*daemon.Daemon
func (*DaemonStore) Size ¶
func (s *DaemonStore) Size() int
func (*DaemonStore) WalkDaemons ¶
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) CleanupDaemons ¶
Cleanup deletes all daemon records
func (*Database) DeleteDaemon ¶
DeleteDaemon deletes daemon record from database
func (*Database) SaveDaemon ¶
SaveDaemon saves daemon record from database
func (*Database) UpdateDaemon ¶
UpdateDaemon updates daemon record in the database
Click to show internal directories.
Click to hide internal directories.