fluxdb

package
v0.0.0-...-e4e1abe Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*shutter.Shutter
	// contains filtered or unexported fields
}

func New

func New(config *Config, modules *Modules) *App

func (*App) Run

func (a *App) Run() error

type Config

type Config struct {
	StoreDSN                 string // Storage connection string
	BlockStreamAddr          string // gRPC endpoint to get real-time blocks
	EnableServerMode         bool   // Enables flux server mode, launch a server
	EnableInjectMode         bool   // Enables flux inject mode, writes into kvd
	EnableReprocSharderMode  bool   // Enables flux reproc shard mode, exclusive option, cannot be set if either server, injector or reproc-injector mode is set
	EnableReprocInjectorMode bool   // Enables flux reproc injector mode, exclusive option, cannot be set if either server, injector or reproc-shard mode is set
	BlockStoreURL            string // dbin blocks store

	// Available for reproc mode only (either reproc shard or reproc injector)
	ReprocShardStoreURL string
	ReprocShardCount    uint64

	// Available for reproc-shard only
	ReprocSharderStartBlockNum    uint64
	ReprocSharderStopBlockNum     uint64
	ReprocSharderScratchDirectory string

	// Available for reproc-injector only
	ReprocInjectorShardIndex uint64

	DisableIndexing            bool   // Disables indexing when injecting data in write mode, should never be used in production, present for repair jobs
	DisableShardReconciliation bool   // Do not reconcile all shard last written block to the current active last written block, should never be used in production, present for repair jobs
	DisablePipeline            bool   // Connects to blocks pipeline, can be used to have a development server only fluxdb
	IgnoreIndexRangeStart      uint64 // When indexing a tablet, ignore an existing an index if it's between this range start boundary, both start/stop must be defined to be taken into account
	IgnoreIndexRangeStop       uint64 // When indexing a tablet, ignore an existing an index if it's between this range stop boundary, both start/stop must be defined to be taken into account
	WriteOnEachBlock           bool   // Writes to storage engine at each irreversible block, can be used in development to flush more rapidly to storage
}

func (*Config) Validate

func (config *Config) Validate() error

Validate inspects itself to determine if the current config is valid according to FluxDB rules.

type Modules

type Modules struct {
	// Required dependencies
	BlockMapper        fluxdb.BlockMapper
	OnServerMode       func(db *fluxdb.FluxDB)
	OnInjectMode       func(db *fluxdb.FluxDB)
	StartBlockResolver bstream.StartBlockResolver

	// Optional dependencies
	BlockFilter func(blk *bstream.Block) error
	BlockMeta   pbblockmeta.BlockIDClient
}

Jump to

Keyboard shortcuts

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