Orca · API

orca.name

Name: the partition key of a keyed pipeline (orca.keyed).

A name is 1 to 128 bytes of [A-Za-z0-9._:/-] without two dots in a row, such as a log's UUID or a repository's owner/name. A / separates segments, so a name doesn't start or end with one or have two in a row. Neither a comma nor .. can appear in one, so a list of names on the command line or in runs.partitions reads back unambiguously. Names order by their bytes. A name has no next or previous name and falls in no date: it's a Key but not a TimeKey.

Wherever a name becomes one segment of a path or a URL (an attempt's log, /pipelines/<name>/keys/<key>), it goes through path_segment, which writes / as %2F; no other byte of a name needs escaping.

Structs

Name

struct Name

Implements Copyable, Equatable, Key, Movable, Writable

Fields
text: String

__init__

def __init__(out self, var text: String)

A name already checked; parse checks one.

__lt__

def __lt__(self, other: Self) -> Bool

__eq__

def __eq__(self, other: Self) -> Bool

parse

def parse(s: StringSpan) -> Self

write_to

def write_to(self, mut writer: T)

Functions

path_segment

def path_segment(name: StringSpan) -> String

name as one segment of a path: each / written %2F. A name holds no %, so this can't collide with another name.

parse_names

def parse_names(s: StringSpan) -> List[Name]

A comma-separated list of names, each once. A range is refused.

sort_texts

def sort_texts(mut l: List[String])

Sorts l in place, by bytes: a merge sort, as there can be thousands of keys.

Aliases

comptime MAX_NAME = 128