ufd

package
v0.0.0-...-26b8ccb Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PoolMetaDkey  = "metadata"
	CreatorAkey   = "creator"
	CreatedAkey   = "created"
	ContTableAkey = "cont_table"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

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

Handle is a pool handle and is the main interface.

func Connect

func Connect(group, pool string) (*Handle, error)

Connect returns a Handle. This is the main entry point.

func (*Handle) Close

func (h *Handle) Close() error

func (*Handle) Info

func (h *Handle) Info() (*daos.PoolInfo, error)

Info returns the underlying pool's native Info struct.

func (*Handle) List

func (h *Handle) List() ([][]byte, error)

func (*Handle) LookupContainer

func (h *Handle) LookupContainer(name string) (string, error)

LookupContainer returns the uuid of the named container.

func (*Handle) Meta

func (h *Handle) Meta() (Meta, error)

Meta returns object containing additional data for the managed pool.

func (*Handle) NewContainer

func (h *Handle) NewContainer(name string, id string) error

NewContainer creates a new conatiner with given name. The ID parameter is optional.

func (*Handle) OpenContainer

func (pm *Handle) OpenContainer(cont string, flags int) (*daos.ContHandle, error)

OpenContainer opens the named container and returns native daos handle for the container.

func (*Handle) PoolMetaInit

func (h *Handle) PoolMetaInit() error

PoolMetaInit creates a container for pool metadata and creates two objects. One for pool level metadata (creator,etc) and the other to store container information. This should only be called once in the lifetime of a pool.

type Meta

type Meta interface {
	Close() error
	Creator() string
	Created() time.Time
	ContTable() *daos.ObjectID
}

Meta provides additional information about the managed pool.

type OpenFlag

type OpenFlag int

OpenFlag indicates if open is Readonly or ReadWrite

const (
	Readonly  OpenFlag = iota
	ReadWrite          = iota
)

Jump to

Keyboard shortcuts

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