local

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ShipperModeReadWrite is to allow both read and write
	ShipperModeReadWrite = iota
	// ShipperModeReadOnly is to allow only read operations
	ShipperModeReadOnly
	// ShipperModeWriteOnly is to allow only write operations
	ShipperModeWriteOnly

	// ShipperFileUploadInterval defines interval for uploading active boltdb files from local which are being written to by ingesters.
	ShipperFileUploadInterval = 15 * time.Minute

	// BoltDBShipperType holds the index type for using boltdb with shipper which keeps flushing them to a shared storage
	BoltDBShipperType = "boltdb-shipper"

	// FilesystemObjectStoreType holds the periodic config type for the filesystem store
	FilesystemObjectStoreType = "filesystem"
)

Variables

This section is empty.

Functions

func NewBoltDBIndexClientWithShipper

func NewBoltDBIndexClientWithShipper(cfg local.BoltDBConfig, archiveStoreClient chunk.ObjectClient, archiverCfg ShipperConfig, registerer prometheus.Registerer) (chunk.IndexClient, error)

NewBoltDBIndexClientWithShipper creates a new IndexClient that used BoltDB.

func NewBoltDBShipperTableClient

func NewBoltDBShipperTableClient(objectClient chunk.ObjectClient) chunk.TableClient

Types

type BoltDBGetter

type BoltDBGetter interface {
	GetDB(name string, operation int) (*bbolt.DB, error)
}

type BoltdbIndexClientWithShipper

type BoltdbIndexClientWithShipper struct {
	*local.BoltIndexClient
	// contains filtered or unexported fields
}

func (*BoltdbIndexClientWithShipper) QueryPages

func (b *BoltdbIndexClientWithShipper) QueryPages(ctx context.Context, queries []chunk.IndexQuery, callback func(chunk.IndexQuery, chunk.ReadBatch) (shouldContinue bool)) error

func (*BoltdbIndexClientWithShipper) Stop

func (b *BoltdbIndexClientWithShipper) Stop()

type Shipper

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

func NewShipper

func NewShipper(cfg ShipperConfig, storageClient chunk.ObjectClient, boltDBGetter BoltDBGetter, registerer prometheus.Registerer) (*Shipper, error)

NewShipper creates a shipper for syncing local objects with a store

func (*Shipper) Stop

func (s *Shipper) Stop()

Stop the shipper and push all the local files to the store

type ShipperConfig

type ShipperConfig struct {
	ActiveIndexDirectory string        `yaml:"active_index_directory"`
	SharedStoreType      string        `yaml:"shared_store"`
	CacheLocation        string        `yaml:"cache_location"`
	CacheTTL             time.Duration `yaml:"cache_ttl"`
	ResyncInterval       time.Duration `yaml:"resync_interval"`
	IngesterName         string        `yaml:"-"`
	Mode                 int           `yaml:"-"`
}

func (*ShipperConfig) RegisterFlags

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

RegisterFlags registers flags.

Jump to

Keyboard shortcuts

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