cmd

package
v1.77.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinBranchesCapacity               = 100
	MinCommitsCapacity                = 10000
	MinGarbageCollectionRulesCapacity = 10
)
View Source
const (
	ScanCmdMinArgs = 1
	ScanCmdMaxArgs = 2
	GetCmdNumArgs  = 2
)

Variables

View Source
var (
	ErrMultiplePartitions = errors.New("multiple partitions in input")
	ErrBadPartitionFormat = errors.New("bad partition format")
)
View Source
var (
	ErrBadCallback    = errors.New("bad callback")
	ErrNotFunc        = fmt.Errorf("%w: not a func", ErrBadCallback)
	ErrFuncParameters = fmt.Errorf("%w: bad func parameters", ErrBadCallback)
	ErrFuncReturn     = fmt.Errorf("%w: bad func return", ErrBadCallback)
	ErrUnknownType    = errors.New("unknown type")
	ErrNoMatch        = errors.New("no callback matched")
)

Functions

func DoMigration added in v0.102.0

func DoMigration(ctx context.Context, kvStore kv.Store, _ *config.BaseConfig, _ bool) error

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetOldParsedStorageNamespace added in v1.68.0

func GetOldParsedStorageNamespace(ns string) (string, error)

func GetRoot added in v1.47.0

func GetRoot() *cobra.Command

func LoadConfig added in v1.59.0

func LoadConfig() config.Config

func ReadBranchesAndCommits added in v1.74.0

func ReadBranchesAndCommits(ctx context.Context, r io.Reader, store kv.Store) (string, string, error)

ReadBranchesAndCommits reads branches and commits from r into store. It returns the repository ID and its UID.

func ReadJSON added in v1.74.0

func ReadJSON(reader *bufio.Reader, funcs ...any) error

ReadJSON unmarshals lines of complete JSON records from r. Every callback should be a func of the form `func(*Struct) error` for some Struct; ReadJSON tries to convert each line to the parameter type of the each callback, calls the first callback whose argument matches, and returns its error.

Types

type DumpHeader added in v1.74.0

type DumpHeader[T any] struct {
	Partition string `json:"partition"`
	Key       string `json:"key"`
	Value     T      `json:"value"`
}

DumpHeader[T] is the JSON structure to expect for an object holding a T.

type RefManager added in v1.74.0

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

func (*RefManager) GCBranchIterator added in v1.74.0

func (r *RefManager) GCBranchIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)

func (*RefManager) GCCommitIterator added in v1.74.0

func (r *RefManager) GCCommitIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)

func (*RefManager) GetCommit added in v1.74.0

func (r *RefManager) GetCommit(ctx context.Context, repository *graveler.RepositoryRecord, commitID graveler.CommitID) (*graveler.Commit, error)

func (*RefManager) ListCommits added in v1.74.0

func (r *RefManager) ListCommits(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)

type Shutter

type Shutter interface {
	Shutdown(context.Context) error
}

type Task added in v1.68.0

type Task struct {
	Description string
	Function    func(context.Context, *TaskServices, bool) error
}

Task represents a migration task

type TaskServices added in v1.68.0

type TaskServices struct {
	Config       config.Config
	KVStore      kv.Store
	BlockAdapter block.Adapter
}

Jump to

Keyboard shortcuts

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