warehouse

package
v0.5.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClosed = errors.New("closed")
)
View Source
var (
	ErrUnknownType = errors.New("unknown data type")
)

Functions

This section is empty.

Types

type StoreRequest

type StoreRequest struct {
	DataType  string
	Data      []byte
	Slot      uint64
	Id        string
	Timestamp time.Time
	// contains filtered or unexported fields
}

func (StoreRequest) Loggable

func (req StoreRequest) Loggable() map[string]any

type Warehouse

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

func NewWarehouse

func NewWarehouse(logger log.Logger, bufSize int) *Warehouse

func (*Warehouse) AttachMetrics

func (s *Warehouse) AttachMetrics(m *metrics.Metrics)

func (*Warehouse) Close

func (s *Warehouse) Close(ctx context.Context)

func (*Warehouse) Run

func (s *Warehouse) Run(ctx context.Context, datadir string, id int)

func (*Warehouse) RunParallel

func (s *Warehouse) RunParallel(ctx context.Context, datadir string, numWorkers int) error

func (*Warehouse) StoreAsync

func (s *Warehouse) StoreAsync(ctx context.Context, req StoreRequest) error

type WarehouseMetrics

type WarehouseMetrics struct {
	Writes       *prometheus.CounterVec
	FailedWrites *prometheus.CounterVec
}

Jump to

Keyboard shortcuts

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