snapshot

package
v2.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	// Key is the key of the snapshot
	Key string
	// Snapshotter is the name of the snapshotter managing the snapshot
	Snapshotter string
}

type Snapshot

type Snapshot struct {
	// Key is the key of the snapshot
	Key Key
	// Kind is the kind of the snapshot (active, committed, view)
	Kind snapshot.Kind
	// Size is the size of the snapshot in bytes.
	Size uint64
	// Inodes is the number of inodes used by the snapshot
	Inodes uint64
	// Timestamp is latest update time (in nanoseconds) of the snapshot
	// information.
	Timestamp int64
}

Snapshot contains the information about the snapshot.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store stores all snapshots.

func NewStore

func NewStore() *Store

NewStore creates a snapshot store.

func (*Store) Add

func (s *Store) Add(snapshot Snapshot)

Add a snapshot into the store.

func (*Store) Delete

func (s *Store) Delete(key Key)

Delete deletes the snapshot with specified key.

func (*Store) Get

func (s *Store) Get(key Key) (Snapshot, error)

Get returns the snapshot with specified key. Returns errdefs.ErrNotFound if the snapshot doesn't exist.

func (*Store) List

func (s *Store) List() []Snapshot

List lists all snapshots.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy