segment

package
v0.0.0-...-d67b09b Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSOpts

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

type Option

type Option func(opts *FSOpts)

func WithFlushInterval

func WithFlushInterval(interval time.Duration) Option

func WithMaxBufferSize

func WithMaxBufferSize(size int64) Option

func WithMergeFloor

func WithMergeFloor(size int64) Option

func WithMergeInterval

func WithMergeInterval(interval time.Duration) Option

func WithRefreshInterval

func WithRefreshInterval(interval time.Duration) Option

type SegmentFSRepository

type SegmentFSRepository struct {
	*FSOpts
	// contains filtered or unexported fields
}

func NewDefaultSegmentFSRepository

func NewDefaultSegmentFSRepository(codec codec2.Codec, rootPath string, options ...Option) (*SegmentFSRepository, error)

func (*SegmentFSRepository) Close

func (sr *SegmentFSRepository) Close(ctx context.Context) error

func (*SegmentFSRepository) Load

func (sr *SegmentFSRepository) Load(ctx context.Context, key string) (domain.KV, error)

func (*SegmentFSRepository) Save

func (sr *SegmentFSRepository) Save(ctx context.Context, kv domain.KV) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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