object

package
v0.0.0-...-f899974 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Shutdown

func Shutdown(o ObjectStorage)

Types

type Object

type Object interface {
	Key() string
	Size() int64
	Mtime() time.Time
	IsDir() bool
	IsSymlink() bool
	StorageClass() string
}

type ObjectStorage

type ObjectStorage interface {
	// Description of the object storage.
	String() string
	// Get the data for the given object specified by key.
	Get(inode uint64, off int64, key *[]byte) ([]byte, error)
	// Put data read from a reader to an object specified by key.
	Put(inode uint64, key []byte, data []byte, size int64) error
	// Delete a object.
	Delete(inode uint64, key string) error
}

ObjectStorage is the interface for object storage. all of these API should be idempotent.

func CreateStorage

func CreateStorage(addr string) (ObjectStorage, error)

type Shutdownable

type Shutdownable interface {
	Shutdown()
}

Jump to

Keyboard shortcuts

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