freezer

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const RootPathDataFile = "data.bin"
View Source
const RootPathSidecarFile = "sidecar.bin"

Variables

This section is empty.

Functions

func PutObjectSSZIntoFreezer

func PutObjectSSZIntoFreezer(objectName, freezerNamespace string, numericalId uint64, object marshalerHashable, record Freezer) error

Types

type BlobStore

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

func NewBlobStore

func NewBlobStore(f Freezer) *BlobStore

func (*BlobStore) Get

func (b *BlobStore) Get(namespace, object, id string) ([]byte, error)

func (*BlobStore) Put

func (b *BlobStore) Put(dat []byte, namespace, object, id string) error

type Freezer

type Freezer interface {
	Getter
	Putter
}

type Getter

type Getter interface {
	Get(namespace, object, id string, extra ...string) (data io.ReadCloser, sidecar []byte, err error)
}

type InMemory

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

func (*InMemory) Get

func (f *InMemory) Get(namespace string, object string, id string, extra ...string) (data io.ReadCloser, sidecar []byte, err error)

func (*InMemory) Put

func (f *InMemory) Put(data io.Reader, sidecar []byte, namespace string, object string, id string, extra ...string) error

type Putter

type Putter interface {
	Put(data io.Reader, sidecar []byte, namespace, object, id string, extra ...string) error
}

type RootPathOsFs

type RootPathOsFs struct {
	Root string
}

func (*RootPathOsFs) Get

func (f *RootPathOsFs) Get(namespace string, object string, id string, extra ...string) (data io.ReadCloser, sidecar []byte, err error)

func (*RootPathOsFs) Put

func (f *RootPathOsFs) Put(data io.Reader, sidecar []byte, namespace string, object string, id string, extra ...string) error

type SidecarBlobStore

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

func NewSidecarBlobStore

func NewSidecarBlobStore(f Freezer) *SidecarBlobStore

func (*SidecarBlobStore) Get

func (b *SidecarBlobStore) Get(namespace, object, id string) (blob []byte, sidecar []byte, err error)

func (*SidecarBlobStore) Put

func (b *SidecarBlobStore) Put(dat []byte, sidecar []byte, namespace, object, id string) error

Jump to

Keyboard shortcuts

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