Skip to content

Commit 654401f

Browse files
Include example configurations for each orderer
Signed-off-by: BryceGattis <[email protected]>
1 parent 3597bfe commit 654401f

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

docs/source/package_orderers.rst

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ Per Family Order
3434

3535
This orderer allows you to define different orderers to different package families.
3636

37+
.. code-block:: python
38+
39+
package_orderers = [
40+
{
41+
"type": "per_family",
42+
"orderers": [
43+
{
44+
"packages": ["python"],
45+
"type": "version_split",
46+
"first_version": "2.7.16"
47+
}
48+
]
49+
}
50+
]
51+
3752
Version Split Package Order
3853
---------------------------
3954

@@ -43,10 +58,29 @@ sorted order.
4358
For example, given the versions [5, 4, 3, 2, 1], an orderer initialized with version=3 would give the
4459
order [3, 2, 1, 5, 4].
4560

61+
.. code-block:: python
62+
63+
package_orderers = [
64+
{
65+
"type": "version_split",
66+
"first_version": "2.7.16"
67+
}
68+
]
69+
4670
Timestamp Package Order
4771
-----------------------
4872

4973
This orderer takes in a given time ``T`` and returns packages released before ``T``, in descending order, followed by
5074
those released after.
5175

52-
If ``rank`` is non-zero, version changes at that rank and above are allowed over the timestamp.
76+
If ``rank`` is non-zero, version changes at that rank and above are allowed over the timestamp.
77+
78+
.. code-block:: python
79+
80+
package_orderers = [
81+
{
82+
"type": "soft_timestamp",
83+
"timestamp": 1568001600, # 2019-09-09
84+
"rank": 3
85+
}
86+
]

0 commit comments

Comments
 (0)