mark

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 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 mark holds what a unit's triggers already handled: per unit and mark name, the value of the signal a round or a workflow covered. The core owns the encoding and the comparison; what a signal is belongs to whoever declares the mark.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handled

func Handled(stored string, current any) bool

Handled says whether stored covers current: a string is a version, handled by the same value; a time or an int is a watermark, handled up to stored. An empty signal is handled: there is nothing to handle.

func Merge

func Merge(stored string, v Value) string

Merge is what a unit keeps when v is recorded over stored: v, unless v is a watermark stored already covers.

func Of

func Of(workflow, name string) string

Of is the name a workflow's mark is stored under: a workflow writes only its own marks, and no plugin mark has a slash.

func ValidName

func ValidName(name string) error

ValidName checks the name a plugin gives a mark, or a workflow one of its own before Of.

Types

type Value

type Value struct {
	Value     string
	Watermark bool
}

Value is a mark's canonical value and its kind: a version is replaced by any new value, a watermark only by a later one.

func New

func New(v any) (Value, bool)

New is v's mark: a string as is (a version), a time in event.TimeLayout, which sorts as text, or an int in decimal (a watermark). False for a value that cannot be a mark: empty, zero time, or another type.

Jump to

Keyboard shortcuts

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