managerstream

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const NumberOfWorkerProcesses = 20

Variables

View Source
var DefaultClientConfig = &ClientConfig{
	LatestMarkTimeout: time.Second * 5,
}

Functions

func ExtractStringFromMapInterface added in v0.9.14

func ExtractStringFromMapInterface(key string, m map[string]interface{}) (stringValue string, isString bool)

Types

type ClientConfig

type ClientConfig struct {
	LatestMarkTimeout time.Duration
}

type IndexerClient

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

func NewIndexerClient

func NewIndexerClient(
	ctx context.Context,
	logger *zap.Logger,
	f flow.Flow,
	inFlow flow.IngestionFlow,
	c *ClientConfig,
) *IndexerClient

func (*IndexerClient) CloseStream

func (ic *IndexerClient) CloseStream(ctx context.Context, streamID uuid.UUID) error

CloseStream removes stream from worker/client

func (*IndexerClient) GetData

func (ic *IndexerClient) GetData(
	ctx context.Context,
	taskID uuid.UUID,
	heightRange structs.ExpandedHeightRange,
	stream *cStructs.StreamAccess,
)

func (*IndexerClient) GetLatestMark

func (ic *IndexerClient) GetLatestMark(
	ctx context.Context,
	taskID uuid.UUID,
	ldr structs.LatestDataRequest,
	stream *cStructs.StreamAccess,
)

GetLatestMark gets latest block

func (*IndexerClient) Ingest added in v0.9.14

func (ic *IndexerClient) Ingest(
	ctx context.Context,
	taskID uuid.UUID,
	heightRange structs.ExpandedHeightRange,
	stream *cStructs.StreamAccess,
)

Ingest has a worker ingest data from a specified data source and leaves it up to the worker implementation to specify where transformed data gets persisted to.

func (*IndexerClient) LatestSequence added in v0.9.14

func (ic *IndexerClient) LatestSequence(
	ctx context.Context,
	taskID uuid.UUID,
	ldr structs.LatestDataRequest,
	stream *cStructs.StreamAccess,
)

func (*IndexerClient) RegisterStream

func (ic *IndexerClient) RegisterStream(ctx context.Context, stream *cStructs.StreamAccess) error

RegisterStream adds new listeners to the streams - currently fixed number per stream

func (*IndexerClient) Run

func (ic *IndexerClient) Run(ctx context.Context, stream *cStructs.StreamAccess)

Directories

Path Synopsis
transport
grpc
Package GRPC incorporate GRPC interface of worker allows it to accept new streams and forward messages
Package GRPC incorporate GRPC interface of worker allows it to accept new streams and forward messages

Jump to

Keyboard shortcuts

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