S5 sdk-objects-cap-option: OptionObjectsCapMiB
Builds: design 47 G §513, §547 (A-343, A-344) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -50,6 +50,9 @@ const (
|
|||||||
OptionAgeDays = "max-age-days"
|
OptionAgeDays = "max-age-days"
|
||||||
// OptionCapMiB is the cap of a stream, a bucket or an object store, in MiB.
|
// OptionCapMiB is the cap of a stream, a bucket or an object store, in MiB.
|
||||||
OptionCapMiB = "max-mib"
|
OptionCapMiB = "max-mib"
|
||||||
|
// OptionObjectsCapMiB is the cap of a state's objects store `<state>-objects`, in MiB, where the state needs
|
||||||
|
// another than the one the bus module plans (design 47 G §513, §547).
|
||||||
|
OptionObjectsCapMiB = "objects-max-mib"
|
||||||
// OptionGrant names the trusted config value granting another module a part of it (ADR 0363 §4, ADR 0592 §9).
|
// OptionGrant names the trusted config value granting another module a part of it (ADR 0363 §4, ADR 0592 §9).
|
||||||
OptionGrant = "grant"
|
OptionGrant = "grant"
|
||||||
// OptionDeliveries is how many times a work queue's message is delivered before it is a dead letter.
|
// OptionDeliveries is how many times a work queue's message is delivered before it is a dead letter.
|
||||||
|
|||||||
@@ -53,3 +53,10 @@ func decodeStrictObjects(raw string) (Manifest, error) {
|
|||||||
type errString string
|
type errString string
|
||||||
|
|
||||||
func (e errString) Error() string { return string(e) }
|
func (e errString) Error() string { return string(e) }
|
||||||
|
|
||||||
|
// The option naming a state's objects cap is exported with the bounds the judge checks it by (design 47 G §513, §547).
|
||||||
|
func TestTheObjectsCapOptionIsNamedWithItsBounds(t *testing.T) {
|
||||||
|
if OptionObjectsCapMiB != "objects-max-mib" || ObjectsLeastMiB != 1 || ObjectsMostMiB != 8192 {
|
||||||
|
t.Fatalf("option %q, bounds %d to %d", OptionObjectsCapMiB, ObjectsLeastMiB, ObjectsMostMiB)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user