local

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fixtures = []testutils.Fixture{
	&fixture{
		name: "boltdb",
	},
}

Fixtures for unit testing GCP storage.

Functions

func NewBoltDBIndexClient

func NewBoltDBIndexClient(cfg BoltDBConfig) (chunk.IndexClient, error)

NewBoltDBIndexClient creates a new IndexClient that used BoltDB.

func NewTableClient

func NewTableClient(directory string) (chunk.TableClient, error)

NewTableClient returns a new TableClient.

Types

type BoltDBConfig

type BoltDBConfig struct {
	Directory string `yaml:"directory"`
}

BoltDBConfig for a BoltDB index client.

func (*BoltDBConfig) RegisterFlags

func (cfg *BoltDBConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags.

type FSConfig

type FSConfig struct {
	Directory string `yaml:"directory"`
}

FSConfig is the config for a FSObjectClient.

func (*FSConfig) RegisterFlags

func (cfg *FSConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags.

type FSObjectClient

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

FSObjectClient holds config for filesystem as object store

func NewFSObjectClient

func NewFSObjectClient(cfg FSConfig) (*FSObjectClient, error)

NewFSObjectClient makes a chunk.ObjectClient which stores chunks as files in the local filesystem.

func (*FSObjectClient) DeleteChunksBefore

func (f *FSObjectClient) DeleteChunksBefore(ctx context.Context, ts time.Time) error

DeleteChunksBefore implements BucketClient

func (*FSObjectClient) GetChunks

func (f *FSObjectClient) GetChunks(ctx context.Context, chunks []chunk.Chunk) ([]chunk.Chunk, error)

GetChunks implements ObjectClient

func (*FSObjectClient) PutChunks

func (f *FSObjectClient) PutChunks(_ context.Context, chunks []chunk.Chunk) error

PutChunks implements ObjectClient

func (FSObjectClient) Stop

func (FSObjectClient) Stop()

Stop implements ObjectClient

Jump to

Keyboard shortcuts

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