sched

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchEntry added in v0.1.6

type BatchEntry struct {
	WriteTime time.Time
	Seq       uint32
}

type RowsBatchHandler added in v0.1.6

type RowsBatchHandler interface {
	HandleBatch(shardID uint64, rows []cluster.ForwardRow, first bool) (int64, error)
}

type ShardFailListener added in v0.1.6

type ShardFailListener interface {
	ShardFailed(shardID uint64)
}

ShardFailListener is called when a shard fails - this is only caused for unretryable errors where we need to stop processing, and it allows other things (e.g. aggregations) to clear up any in memory state

type ShardScheduler

type ShardScheduler struct {
	ShardFailListener ShardFailListener
	// contains filtered or unexported fields
}

func NewShardScheduler

func NewShardScheduler(shardID uint64, batchHandler RowsBatchHandler, shardFailListener ShardFailListener,
	clust cluster.Cluster, maxProcessBatchSize int, maxForwardWriteBatchSize int) *ShardScheduler

func (*ShardScheduler) AddForwardBatch added in v0.1.6

func (s *ShardScheduler) AddForwardBatch(writeBatch []byte) error

func (*ShardScheduler) AddRows added in v0.1.6

func (s *ShardScheduler) AddRows(rows []cluster.ForwardRow)

func (*ShardScheduler) GetLag added in v0.1.6

func (s *ShardScheduler) GetLag(nowNanos uint64) time.Duration

func (*ShardScheduler) ShardID

func (s *ShardScheduler) ShardID() uint64

func (*ShardScheduler) Start

func (s *ShardScheduler) Start()

func (*ShardScheduler) Stop

func (s *ShardScheduler) Stop()

func (*ShardScheduler) WaitForProcessingToComplete added in v0.1.6

func (s *ShardScheduler) WaitForProcessingToComplete(ch chan struct{})

type WriteBatchEntry added in v0.1.6

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

Jump to

Keyboard shortcuts

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