stores

package
v0.0.0-...-575026b Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fork

type Fork struct {
	R cadata.Getter
	W interface {
		cadata.Poster
		cadata.Exister
		cadata.Deleter
	}
}

Fork is a write layer on top of a read-only store.

func (*Fork) Delete

func (f *Fork) Delete(ctx context.Context, id cadata.ID) error

func (*Fork) Exists

func (f *Fork) Exists(ctx context.Context, id cadata.ID) (bool, error)

func (*Fork) Get

func (f *Fork) Get(ctx context.Context, id cadata.ID, buf []byte) (int, error)

func (*Fork) Hash

func (f *Fork) Hash(data []byte) cadata.ID

func (*Fork) MaxSize

func (f *Fork) MaxSize() int

func (*Fork) Post

func (f *Fork) Post(ctx context.Context, data []byte) (cadata.ID, error)

type UnionGet

type UnionGet []cadata.Getter

func (UnionGet) Get

func (u UnionGet) Get(ctx context.Context, id cadata.ID, buf []byte) (int, error)

func (UnionGet) Hash

func (u UnionGet) Hash(x []byte) cadata.ID

func (UnionGet) MaxSize

func (u UnionGet) MaxSize() int

Jump to

Keyboard shortcuts

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