pallet.version-dispatch documentation

Dispatch that is version aware.

A version is a dotted string, eg. "1.0.3", which is represented as a vector [1 0 3].

A version specification is either a version vector, which matches a single version (and all point versions thereof), or a vector of two elements, specifying an inclusive version range. A nil in the version vector signifies an open end to the range.

The basic idea is that you wish to dispatch on hierarchy where the dispatched data may provide a version.

defmulti-os

[name [os os-version & args] hierarchy-place]

Defines a multi-version funtion used to abstract over an operating system hierarchy, where dispatch includes an optional os-version. The version refers to a software package version of some sort, on the specified os and os-version.

defmulti-os-crate

[name [session & args]]

Defines a multi-os funtion used to abstract over an operating system hierarchy, where dispatch includes an optional os-version. The version refers to a software package version of some sort, on the specified os and os-version.

defmulti-version

[name [os os-version version & args] hierarchy-place]

Defines a multi-version funtion used to abstract over an operating system hierarchy, where dispatch includes an optional os-version. The version refers to a software package version of some sort, on the specified os and os-version.

defmulti-version-crate

[name [version session & args]]

Defines a multi-version funtion used to abstract over an operating system hierarchy, where dispatch includes an optional os-version. The version refers to a software package version of some sort, on the specified os and os-version.

hierarchy-vals

[hierarchy]

Returns all values in a hierarchy, whether parents or children.

multi-os-method

[multi-version {:keys [os os-version], :as dispatch-value} [& args] & body]

Adds a method to the specified multi-os function for the specified dispatch-value.

multi-os-session-method

[multi-version {:keys [os os-version], :as dispatch-value} [session & args] & body]

Adds a method to the specified multi-version function for the specified dispatch-value.

multi-version-method

[multi-version {:keys [os os-version version], :as dispatch-value} [& args] & body]

Adds a method to the specified multi-version function for the specified dispatch-value.

multi-version-session-method

[multi-version {:keys [os os-version version], :as dispatch-value} [session & args] & body]

Adds a method to the specified multi-version function for the specified dispatch-value.