Help us shape the future of Go! Take the 2026 Go Developer Survey

work

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package work defines caller-owned work identity. Keys and tags are opaque: consumers may store and compare them, but assign them no tracker semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key string

Key identifies one unit of work. The empty key means no work is addressed.

func (Key) Filename

func (k Key) Filename() string

Filename is a bounded, collision-resistant path component, including on case-insensitive filesystems. Stores also verify the key inside the file.

type Ref

type Ref struct {
	Key  Key               `json:"key,omitempty"`
	Tags map[string]string `json:"tags,omitempty"`
}

Ref carries identity and optional caller-defined metadata.

func (Ref) Clone

func (r Ref) Clone() Ref

Clone copies metadata so updating a reference cannot change another record.

func (Ref) Matches

func (r Ref) Matches(tags map[string]string) bool

Matches reports whether the reference contains all the requested tags.

Jump to

Keyboard shortcuts

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