Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoBatcher

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

func NewAutoBatcher

func NewAutoBatcher(batchSize int32, validity int64, supplier IDBatchSupplier) *AutoBatcher

func (*AutoBatcher) NewID

func (b *AutoBatcher) NewID() (int64, error)

type Block

type Block struct {
	IDBatch *IDBatch
	// contains filtered or unexported fields
}

func NewBlock

func NewBlock(idBatch *IDBatch, validityMillis int64) *Block

type IDBatch

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

func NewIDBatch

func NewIDBatch(base int64, increment int64, batchSize int32) *IDBatch

func (*IDBatch) Base

func (b *IDBatch) Base() int64

func (*IDBatch) BatchSize

func (b *IDBatch) BatchSize() int32

func (*IDBatch) Increment

func (b *IDBatch) Increment() int64

type IDBatchSupplier

type IDBatchSupplier interface {
	NewIDBatch(batchSize int32) (*IDBatch, error)
}

Source Files