domain

package
v0.0.0-...-5c9bec8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Segment

type Segment struct {
	ID               string
	Step             uint32
	Seq              *atomic.Uint64
	Max              uint64
	PreloadThreshold float32
	// contains filtered or unexported fields
}

func NewSegment

func NewSegment(do *Segment, repo SegmentRepo) *Segment

func (*Segment) FetchNext

func (s *Segment) FetchNext(ctx context.Context) (uint64, error)

type SegmentRepo

type SegmentRepo interface {
	FetchNextSegment(ctx context.Context, ID string, maxID uint64) (*Segment, error)
	SaveSegment(ctx context.Context, ID string, seq, max uint64, step uint32, preloadThreshold float32)
}

Jump to

Keyboard shortcuts

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