common

package
v0.0.0-...-df46cc1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NanosToMillis

func NanosToMillis(nanos int64) int64

func ShouldIncludeMemStore

func ShouldIncludeMemStore(ctx context.Context) bool

func TimeToMillis

func TimeToMillis(ts time.Time) int64

func WithIncludeMemStore

func WithIncludeMemStore(ctx context.Context, includeMemStore bool) context.Context

Types

type Follow

type Follow struct {
	FollowerID     FollowerID
	Stream         string
	EarliestOffset wal.Offset
	Partitions     map[string]*Partition
}

type FollowerID

type FollowerID struct {
	Partition int
	ID        int
}

func (FollowerID) String

func (id FollowerID) String() string

type OffsetsBySource

type OffsetsBySource map[int]wal.Offset

OffsetsBySource is a map of wal Offsets keyed to source ids

func (OffsetsBySource) Advance

func (offsetsBySource OffsetsBySource) Advance(newOffsetsBySource OffsetsBySource) OffsetsBySource

Advance advances offsetsBySource to the higher of the current offset and the new offset from newOffsetsBySource, returning a New OffsetsBySource with the result.

func (OffsetsBySource) HighestTS

func (offsetsBySource OffsetsBySource) HighestTS() time.Time

HighestTS returns the highest TS of any of the offsets

func (OffsetsBySource) LimitAge

func (offsetsBySource OffsetsBySource) LimitAge(limit wal.Offset) OffsetsBySource

LimitAge limits all offsets by source to be no earlier than the given limit

func (OffsetsBySource) LowestTS

func (offsetsBySource OffsetsBySource) LowestTS() time.Time

LowestTS returns the lowest TS of any of the offsets

func (OffsetsBySource) String

func (offsetsBySource OffsetsBySource) String() string

func (OffsetsBySource) TSString

func (offsetsBySource OffsetsBySource) TSString() string

TSString returns a string representation of the timestamps by source

type Partition

type Partition struct {
	Keys   []string
	Tables []*PartitionTable
}

type PartitionTable

type PartitionTable struct {
	Name    string
	Offsets OffsetsBySource
}

type QueryMetaData

type QueryMetaData struct {
	FieldNames []string
	AsOf       time.Time
	Until      time.Time
	Resolution time.Duration
	Plan       string
}

type QueryRemote

type QueryRemote func(sqlString string, includeMemStore bool, isSubQuery bool, subQueryResults [][]interface{}, onValue func(bytemap.ByteMap, []encoding.Sequence)) (hasReadResult bool, err error)

type QueryStats

type QueryStats struct {
	NumPartitions           int
	NumSuccessfulPartitions int
	LowestHighWaterMark     int64
	HighestHighWaterMark    int64
	MissingPartitions       []int
}

QueryStats captures stats about query

type Retriable

type Retriable interface {
	error

	Retriable() bool
}

Retriable is a marker for retriable errors

func MarkRetriable

func MarkRetriable(err error) Retriable

MarkRetriable marks the given error as retriable

Jump to

Keyboard shortcuts

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