cockroach: github.com/cockroachdb/cockroach/pkg/util/span Index | Files

package span

import "github.com/cockroachdb/cockroach/pkg/util/span"

Index

Package Files

frontier.go

type Frontier Uses

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

Frontier tracks the minimum timestamp of a set of spans.

func MakeFrontier Uses

func MakeFrontier(spans ...roachpb.Span) *Frontier

MakeFrontier returns a Frontier that tracks the given set of spans.

func (*Frontier) Entries Uses

func (f *Frontier) Entries(fn func(roachpb.Span, hlc.Timestamp))

Entries invokes the given callback with the current timestamp for each component span in the tracked span set.

func (*Frontier) Forward Uses

func (f *Frontier) Forward(span roachpb.Span, ts hlc.Timestamp) bool

Forward advances the timestamp for a span. Any part of the span that doesn't overlap the tracked span set will be ignored. True is returned if the frontier advanced as a result.

Note that internally, it may be necessary to use multiple entries to represent this timestamped span (e.g. if it overlaps with the tracked span set boundary). Similarly, an entry created by a previous Forward may be partially overlapped and have to be split into two entries.

func (*Frontier) Frontier Uses

func (f *Frontier) Frontier() hlc.Timestamp

Frontier returns the minimum timestamp being tracked.

func (*Frontier) PeekFrontierSpan Uses

func (f *Frontier) PeekFrontierSpan() roachpb.Span

PeekFrontierSpan returns one of the spans at the Frontier.

func (*Frontier) String Uses

func (f *Frontier) String() string

Package span imports 8 packages (graph) and is imported by 9 packages. Updated 2020-01-22. Refresh now. Tools for package owners.