storage

package
v0.0.0-...-3f2d6ab Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBackend

AddBackend adds storage backend information. We won't persist the "save_*_best" fields on the expconf struct. If the same storage backend has been persisted before then we will return the ID and not insert another row.

func Backend

Backend returns the checkpoint storage backend information. We won't return the "save_*_best" fields on the expconf struct.

Types

type CheckpointsGroup

type CheckpointsGroup struct {
	StorageID   *model.StorageBackendID
	Checkpoints []uuid.UUID
}

CheckpointsGroup is a grouping of storage ID to checkpoints. This isn't a map[*model.StorageBackendID][]uuid.UUID since it is pretty easy to misuse the *model.StorageBackendID by just doing something like m[ptrs.Ptr(5)].

func GroupCheckpoints

func GroupCheckpoints(
	ctx context.Context, uuids []uuid.UUID,
) ([]*CheckpointsGroup, error)

GroupCheckpoints takes a list of checkpoints and returns a mapping by storageID.

Jump to

Keyboard shortcuts

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