Documentation ¶
Index ¶
- type Operator
- type OperatorClient
- type Plugin
- func (s *Plugin) Close() error
- func (s *Plugin) Commit(ctx context.Context, name, key string, opts ...snapshots.Opt) (err error)
- func (s *Plugin) Mounts(ctx context.Context, key string) ([]mount.Mount, error)
- func (s *Plugin) Prepare(ctx context.Context, key, parent string, opts ...snapshots.Opt) ([]mount.Mount, error)
- func (s *Plugin) Remove(ctx context.Context, key string) (err error)
- func (s *Plugin) Stat(ctx context.Context, key string) (snapshots.Info, error)
- func (s *Plugin) Update(ctx context.Context, info snapshots.Info, fieldpaths ...string) (snapshots.Info, error)
- func (s *Plugin) Usage(ctx context.Context, key string) (snapshots.Usage, error)
- func (s *Plugin) View(ctx context.Context, key, parent string, opts ...snapshots.Opt) ([]mount.Mount, error)
- func (s *Plugin) Walk(ctx context.Context, fn snapshots.WalkFunc, fs ...string) error
- type PluginClient
- type SnapshotItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
Operator communicates with the containerd interface. Because containerd would cache snapshot information, therefore, we need to communicate with containerd to update the information we have. On the other side, the Plugin class communicates with the snapshotter plugin interface
func NewOperator ¶
func NewOperator(ctx context.Context, client OperatorClient, sn snapshots.Snapshotter) *Operator
func (*Operator) AddSnapshot ¶
func (*Operator) ScanSnapshots ¶
type OperatorClient ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Close ¶
Close releases the internal resources.
Close is expected to be called on the end of the lifecycle of the snapshotter, but not mandatory.
Close returns nil when it is already closed.
func (*Plugin) Remove ¶
Remove the committed or active snapshot by the provided key.
All resources associated with the key will be removed.
If the snapshot is a parent of another snapshot, its children must be removed before proceeding.
type PluginClient ¶
type PluginClient interface { // GetFilesystemPath only use this for starlightfs' stat GetFilesystemPath(compressDigest string) string // GetMountingPoint returns the path of the snapshotter's mounting point, considering // getUpper, getWork, getStarlightFS functions instead of using this function directly GetMountingPoint(ssId string) string // PrepareManager inform the client to load specified manager in memory. // It requires the manifest, Starlight Metadatain and image config is present in containerd's content storage. // In case the above requirements are not met, the client should return an error. // The plugin should then try the next referenced manager (manifest digest). PrepareManager(namespace string, manifest digest.Digest) (err error) // Unmount starlightfs Unmount(compressDigest, key string) error // Mount starlightfs Mount(layerDigest digest.Digest, snapshotId string, sn *snapshots.Info) (mnt string, err error) }
type SnapshotItem ¶
type SnapshotItem struct {
// contains filtered or unexported fields
}
func (SnapshotItem) GetStarlightFeature ¶
func (si SnapshotItem) GetStarlightFeature() (md, und digest.Digest, stack int64)
GetStarlightFeature returns manifest digest, uncompressed digest, and stack number
func (SnapshotItem) IsStarlightFS ¶
func (si SnapshotItem) IsStarlightFS() bool