dataset

package
v0.0.0-...-835c340 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOptions

type CreateOptions struct {
	Log      *slog.Logger
	S3Client *s3.Client
	S3Bucket string
	Config   DatasetConfig
	Name     string
	LocalDir string
}

type Dataset

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

func Create

func Create(
	ctx context.Context,
	opts CreateOptions,
) (*Dataset, error)

func Open

func Open(
	ctx context.Context,
	log *slog.Logger,
	opts OpenOptions,
) (*Dataset, error)

func (*Dataset) Append

func (d *Dataset) Append(w http.ResponseWriter, r *http.Request)

func (*Dataset) Close

func (d *Dataset) Close() error

func (*Dataset) Get

func (d *Dataset) Get(w http.ResponseWriter, r *http.Request)

func (*Dataset) GetInfo

func (d *Dataset) GetInfo(w http.ResponseWriter, r *http.Request)

type DatasetConfig

type DatasetConfig struct {
	MaxArchiveSize uint64        `json:"max_archive_size"`
	MaxArchiveTime time.Duration `json:"max_archive_time"`
}

type DatasetInfo

type DatasetInfo struct {
	Name         string        `json:"name"`
	Config       DatasetConfig `json:"config"`
	FirstIndex   uint64        `json:"first_index"`
	LastIndex    uint64        `json:"last_index"`
	StorageBytes uint64        `json:"bytes"`
}

type OpenOptions

type OpenOptions struct {
	S3Client *s3.Client
	S3Bucket string
	Name     string
	LocalDir string
}

Jump to

Keyboard shortcuts

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