pools

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExists   = errors.New("pool already exists")
	ErrNotFound = errors.New("pool not found")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Ts         nano.Ts        `zed:"ts"`
	Name       string         `zed:"name"`
	ID         ksuid.KSUID    `zed:"id"`
	SortKeys   order.SortKeys `zed:"layout"`
	SeekStride int            `zed:"seek_stride"`
	Threshold  int64          `zed:"threshold"`
}

func NewConfig

func NewConfig(name string, sortKeys order.SortKeys, thresh int64, seekStride int) *Config

func (*Config) Key

func (p *Config) Key() string

func (Config) MarshalZNG added in v1.18.0

func (p Config) MarshalZNG(ctx *zson.MarshalZNGContext) (zed.Type, error)

func (*Config) Path

func (p *Config) Path(root *storage.URI) *storage.URI

func (*Config) UnmarshalZNG added in v1.18.0

func (p *Config) UnmarshalZNG(ctx *zson.UnmarshalZNGContext, val zed.Value) error

type Store

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

func CreateStore

func CreateStore(ctx context.Context, engine storage.Engine, logger *zap.Logger, path *storage.URI) (*Store, error)

func OpenStore

func OpenStore(ctx context.Context, engine storage.Engine, logger *zap.Logger, path *storage.URI) (*Store, error)

func (*Store) Add

func (s *Store) Add(ctx context.Context, config *Config) error

func (*Store) All

func (s *Store) All(ctx context.Context) ([]Config, error)

func (*Store) LookupByID

func (s *Store) LookupByID(ctx context.Context, id ksuid.KSUID) (*Config, error)

func (*Store) LookupByName

func (s *Store) LookupByName(ctx context.Context, name string) *Config

func (*Store) Remove

func (s *Store) Remove(ctx context.Context, config Config) error

Remove deletes a pool from the configuration journal.

func (*Store) Rename

func (s *Store) Rename(ctx context.Context, id ksuid.KSUID, newName string) error

Jump to

Keyboard shortcuts

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