partition

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Less

func Less(r, t Record) bool

Types

type Information

type Information struct {
	PartitionKey   string
	RecordCount    int
	FirstWatermark time.Time
}

type Record

type Record interface {
	GetID() string
	GetPartitionKey() string
	GetWatermark() time.Time
	GetData() []byte
}
var (
	Max Record = RecordImpl{
		ID:           maxPossibleString,
		PartitionKey: maxPossibleString,

		Timestamp: maxTime,
	}
)

type RecordImpl

type RecordImpl struct {
	ID           string
	PartitionKey string
	Timestamp    time.Time
	Data         []byte
}

func (RecordImpl) GetData

func (r RecordImpl) GetData() []byte

func (RecordImpl) GetID

func (r RecordImpl) GetID() string

func (RecordImpl) GetPartitionKey

func (r RecordImpl) GetPartitionKey() string

func (RecordImpl) GetWatermark

func (r RecordImpl) GetWatermark() time.Time

type Strategy

type Strategy interface {
	ShouldRotate(information Information, watermark time.Time) bool
}

Directories

Path Synopsis
strategy

Jump to

Keyboard shortcuts

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