streamstore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

streamstore implements helpers to store large data streams in a repository

Index

Constants

View Source
const (
	FaultErrorsType = "fault_error"

	DetailsType = "details"
)

Variables

This section is empty.

Functions

func NewStreamer

func NewStreamer(
	kw *kopia.Wrapper,
	tenant string,
	service path.ServiceType,
) *storeStreamer

NewStreamer creates a new streamstore Streamer for stream writing metadata files to the store.

Types

type Collectable

type Collectable struct {
	Unmr Unmarshaller

	Type string
	// contains filtered or unexported fields
}

func DetailsCollector

func DetailsCollector(mr Marshaller) Collectable

DetailsCollector generates a collection of details.DetailsModel entries containing the marshalled bytes from the provided marshaller.

func DetailsReader

func DetailsReader(unmr Unmarshaller) Collectable

DetailsReader reads a collection of details.DetailsModel entries using the provided unmarshaller.

func FaultErrorsCollector

func FaultErrorsCollector(mr Marshaller) Collectable

FaultErrorsCollector generates a collection of fault.Errors containing the marshalled bytes from the provided marshaller.

func FaultErrorsReader

func FaultErrorsReader(unmr Unmarshaller) Collectable

FaultErrorsReader reads a collection of fault.Errors entries using the provided unmarshaller.

type Collector

type Collector interface {
	Collect(context.Context, Collectable) error
}

type CollectorWriter

type CollectorWriter interface {
	Collector
	Writer
}

type Marshaller

type Marshaller interface {
	Marshal() ([]byte, error)
}

Marshallers are used to convert structs into bytes to be persisted in the store.

type Reader

type Reader interface {
	Read(context.Context, string, Collectable, *fault.Bus) error
}

type Streamer

type Streamer interface {
	Collector
	Writer
	Reader
}

Streamer is the core interface for all types of data streamed to and from the store.

type Unmarshaller

type Unmarshaller func(io.ReadCloser) error

Unmarshallers are used to serialize the bytes in the store into the original struct.

type Writer

type Writer interface {
	Write(context.Context, []identity.Reasoner, *fault.Bus) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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