sequencer

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package: sequencer / coordination type: adapter job: a steerable clock for --dev — real time until told otherwise limits: time source only; who may steer it is core's access decision (-> core)

package: sequencer / coordination type: factory job: the Sequencer port — build the backend a config names, over the bookmark list it advances limits: wiring only; the head, the merges and the bookmarks are ranke-go's (-> ranke-go)

𝒰_hist is the Universe's own (Universe.Bookmarks), so there is no store to configure — only which list, as a seed or as the id of one entry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sequencer

type Sequencer = ranke.Sequencer

Sequencer is the sequencer port's product: ranke-go's Sequencer contract — immutable snapshots to read from, and merges that advance the head to write.

func New

func New(ctx context.Context, cfg scope.Section, storage ranke.Universe, sig signer.Signer, now func() time.Time) (Sequencer, error)

New builds the backend named by the section's "type". now is the time source claims are dated from; nil defaults to the wall clock, so a caller wanting a steerable one (--dev) supplies it instead.

The archive is opened, never founded: an empty bookmark list comes back reporting InGenesis, leaving Found the composition root's call (-> config).

type SteerableClock

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

SteerableClock is a time source a caller can push forward — real time until the first Advance, then standing where it was put until told to move again. A story that wants its own dates steers to them; they run ahead of bt₀, which minted at boot from this same clock, so every later branch table still chains forward (R-C6MERGE, V-MONO).

func NewSteerableClock

func NewSteerableClock() *SteerableClock

NewSteerableClock returns a clock reading real time until Advance is first called.

func (*SteerableClock) Advance

func (c *SteerableClock) Advance(t time.Time) time.Time

Advance moves the clock to at least t, returning its position afterward. t compares against the clock's own last position — zero before the first call, which is why that first call always lands exactly on t, whatever real time says. A t at or behind the current position is a no-op that just reports where the clock already is.

func (*SteerableClock) Now

func (c *SteerableClock) Now() time.Time

Now is this clock's now func() time.Time source for sequencer.New.

Jump to

Keyboard shortcuts

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