Docket.Guard (docket v0.1.0-dev)

Copy Markdown View Source

Durable guard expression descriptors evaluated on graph edges.

changed/1, version_at_least/2, exists/1, equals/2, all/1, any/1, and not/1 build boolean expressions. path/2 (and a bare channel ID) is a reference expression usable only inside exists/1 and equals/2; it is not a standalone guard.

Summary

Types

op()

@type op() ::
  :all | :any | :changed | :equals | :exists | :not | :path | :version_at_least

t()

@type t() :: %Docket.Guard{args: [term()], op: op()}

Functions

all(expressions)

@spec all([t()]) :: t()

any(expressions)

@spec any([t()]) :: t()

changed(channel)

@spec changed(String.t()) :: t()

equals(ref, value)

@spec equals(term(), term()) :: t()

exists(ref)

@spec exists(term()) :: t()

not expression

@spec not t() :: t()

path(channel, path)

@spec path(String.t(), [String.t() | atom() | integer()]) :: t()

version_at_least(channel, version)

@spec version_at_least(String.t(), non_neg_integer()) :: t()