rings: Prefix and Address factories #48

Merged
karasz merged 6 commits from pr-amery-rings into main 2024-05-29 17:44:11 +02:00
Owner
  • ring 0 (backbone connecting all zones), 16 bits prefix.
  • ring 1 (per-zone lan), 20 bits prefix.
  • ring 2 (global services), 20 bits prefix.
  • ring 3 (pods of a region cluster), 12 bits prefix.
* ring 0 (backbone connecting all zones), 16 bits prefix. * ring 1 (per-zone lan), 20 bits prefix. * ring 2 (global services), 20 bits prefix. * ring 3 (pods of a region cluster), 12 bits prefix.
amery added 6 commits 2024-05-28 00:17:31 +02:00
and a Valid() method to check if their value is within the
valid range.

Signed-off-by: Alejandro Mery <amery@jpi.io>
Signed-off-by: Alejandro Mery <amery@jpi.io>
Ring one designates the (virtual) local network of a zone
within a region.

Signed-off-by: Alejandro Mery <amery@jpi.io>
Ring zero corresponds to the backbone that connects all zones.

Signed-off-by: Alejandro Mery <amery@jpi.io>
Ring 3 corresponds to the pods of the kubernetes cluster of a region

Signed-off-by: Alejandro Mery <amery@jpi.io>
Ring 2 is the service network shared by all kubernetes clusters.

Signed-off-by: Alejandro Mery <amery@jpi.io>
amery requested review from karasz 2024-05-28 00:17:37 +02:00
amery added 1 commit 2024-05-28 02:52:19 +02:00
amery force-pushed pr-amery-rings from 349b5a7df1 to 16f6f1141c 2024-05-28 03:21:34 +02:00 Compare
amery added 4 commits 2024-05-28 16:36:51 +02:00
Ring one designates the (virtual) local network of a zone
within a region.

Signed-off-by: Alejandro Mery <amery@jpi.io>
Ring zero corresponds to the backbone that connects all zones.

Signed-off-by: Alejandro Mery <amery@jpi.io>
Ring 3 corresponds to the pods of the kubernetes cluster of a region

Signed-off-by: Alejandro Mery <amery@jpi.io>
Ring 2 is the service network shared by all kubernetes clusters.

Signed-off-by: Alejandro Mery <amery@jpi.io>
Author
Owner

moved RingFooPrefix() and RingFooAddress() to encode.go in preparation for decode.go @karasz

moved `RingFooPrefix()` and `RingFooAddress()` to `encode.go` in preparation for `decode.go` @karasz
karasz approved these changes 2024-05-29 17:41:05 +02:00
karasz left a comment
Owner

LGTM

LGTM
karasz merged commit e1186975a6 into main 2024-05-29 17:44:11 +02:00
karasz deleted branch pr-amery-rings 2024-05-29 17:44:11 +02:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: amery/jpictl#48