mindreader

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunGRPCServer

func RunGRPCServer(s *grpc.Server, listenAddr string) error

Types

type Archiver

type Archiver interface {
	// contains filtered or unexported methods
}

type BlockFileNamer

type BlockFileNamer func(block *bstream.Block) string

type BlockMarshaller

type BlockMarshaller func(block *bstream.Block) ([]byte, error)

type BlockNumberGator

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

func NewBlockNumberGator

func NewBlockNumberGator(blockNum uint64) *BlockNumberGator

type ConsoleReaderBlockTransformer

type ConsoleReaderBlockTransformer func(obj interface{}) (*bstream.Block, error)

ConsoleReaderBlockTransformer is a function that accepts an `obj` of type `interface{}` as produced by a specialized ConsoleReader implementation and turns it into a `bstream.Block` that is able to flow in block streams.

type ConsolerReader

type ConsolerReader interface {
	Read() (obj interface{}, err error)
	Done() <-chan interface{}
}

type ConsolerReaderFactory

type ConsolerReaderFactory func(reader io.Reader) (ConsolerReader, error)

type ContinuityChecker

type ContinuityChecker interface {
	IsLocked() bool
	Reset()
	Write(lastSeenBlockNum uint64) error
}

type Gator

type Gator interface {
	// contains filtered or unexported methods
}

type MergeArchiver

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

MergeArchiver does the merging in one swift, no need for a merger here.

func NewMergeArchiver

func NewMergeArchiver(
	store dstore.Store,
	blockWriterFactory bstream.BlockWriterFactory,
	stopBlock uint64,
	options ...MergeArchiverOption,
) *MergeArchiver

type MergeArchiverOption

type MergeArchiverOption func(*MergeArchiver)

func WithOverflowArchiver

func WithOverflowArchiver(archiver Archiver) MergeArchiverOption

type MindReaderPlugin

type MindReaderPlugin struct {
	*shutter.Shutter

	ContinuityChecker ContinuityChecker
	// contains filtered or unexported fields
}

func NewMindReaderPlugin

func NewMindReaderPlugin(
	archiver Archiver,
	blockServer *blockstream.Server,
	consoleReaderFactory ConsolerReaderFactory,
	consoleReaderTransformer ConsoleReaderBlockTransformer,
	continuityChecker ContinuityChecker,
	gator Gator,
	stopAtBlockNum uint64,
	channelCapacity int,
	headBlockUpdateFunc manageos.HeadBlockUpdater,
) (*MindReaderPlugin, error)

func RunMindReaderPlugin

func RunMindReaderPlugin(
	archiveStoreURL string,
	mergeArchiveStoreURL string,
	mergeUploadDirectly bool,
	discardAfterStopBlock bool,
	workingDirectory string,
	blockFileNamer BlockFileNamer,
	consoleReaderFactory ConsolerReaderFactory,
	consoleReaderTransformer ConsoleReaderBlockTransformer,
	grpcServer *grpc.Server,
	startBlockNum uint64,
	stopBlockNum uint64,
	channelCapacity int,
	headBlockUpdateFunc manageos.HeadBlockUpdater,
	setMaintenanceFunc func(),
	stopBlockReachFunc func(),
	failOnNonContinuousBlocks bool,
) (*MindReaderPlugin, error)

func (*MindReaderPlugin) Close

func (p *MindReaderPlugin) Close(err error)

func (*MindReaderPlugin) LogLine

func (p *MindReaderPlugin) LogLine(in string)

LogLine receives log line and write it to "pipe" of the local console reader

func (*MindReaderPlugin) ReadFlow

func (p *MindReaderPlugin) ReadFlow()

type OneblockArchiver

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

func NewOneblockArchiver

func NewOneblockArchiver(
	workDir string,
	store dstore.Store,
	blockFileNamer BlockFileNamer,
	blockWriterFactory bstream.BlockWriterFactory,
	stopBlock uint64,
) *OneblockArchiver

type TimeThresholdGator

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

func NewTimeThresholdGatorr

func NewTimeThresholdGatorr(threshold time.Duration) *TimeThresholdGator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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