omap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OmapNameVolumes  = "onmetal.csi.volumes"
	OmapNameOsImages = "onmetal.csi.os-images"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateStrategy

type CreateStrategy[E api.Object] interface {
	PrepareForCreate(obj E)
}

type Options

type Options[E api.Object] struct {
	OmapName       string
	NewFunc        func() E
	CreateStrategy CreateStrategy[E]
}

type Store

type Store[E api.Object] struct {
	// contains filtered or unexported fields
}

func New

func New[E api.Object](conn *rados.Conn, pool string, opts Options[E]) (*Store[E], error)

func (*Store[E]) Create

func (s *Store[E]) Create(ctx context.Context, obj E) (E, error)

func (*Store[E]) Delete

func (s *Store[E]) Delete(ctx context.Context, id string) error

func (*Store[E]) Get

func (s *Store[E]) Get(ctx context.Context, id string) (E, error)

func (*Store[E]) List

func (s *Store[E]) List(ctx context.Context) ([]E, error)

func (*Store[E]) Update

func (s *Store[E]) Update(ctx context.Context, obj E) (E, error)

func (*Store[E]) Watch

func (s *Store[E]) Watch(ctx context.Context) (store.Watch[E], error)

Jump to

Keyboard shortcuts

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