aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/finalise.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-05 17:40:32 +0900
committerOphestra <cat@gensokyo.uk>2025-10-05 17:40:32 +0900
commitae7b343cde93bf59d2e3c7f6316d41c1474dd081 (patch)
tree5f07c90b493f38fe238c347ab2eb121d5350e81c /internal/app/finalise.go
parenta63a372fe07a35fc355f54e72bbace47f157406c (diff)
hst: reword and move constants
These values are considered part of the stable, exported API, so move them to hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/finalise.go')
-rw-r--r--internal/app/finalise.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/app/finalise.go b/internal/app/finalise.go
index ec2d0a9a..3d6ec38d 100644
--- a/internal/app/finalise.go
+++ b/internal/app/finalise.go
@@ -83,8 +83,8 @@ func (k *outcome) finalise(ctx context.Context, msg container.Msg, id *state.ID,
k.ct = ct
}
- // allowed identity range 0 to 9999, this is checked again in hsu
- if config.Identity < 0 || config.Identity > 9999 {
+ // this is checked again in hsu
+ if config.Identity < hst.IdentityMin || config.Identity > hst.IdentityMax {
return newWithMessage(fmt.Sprintf("identity %d out of range", config.Identity))
}
@@ -187,9 +187,9 @@ func (k *outcome) finalise(ctx context.Context, msg container.Msg, id *state.ID,
// enforce bounds and default early
if s.Container.WaitDelay <= 0 {
- kp.waitDelay = hst.DefaultWaitDelay
- } else if s.Container.WaitDelay > hst.MaxWaitDelay {
- kp.waitDelay = hst.MaxWaitDelay
+ kp.waitDelay = hst.WaitDelayDefault
+ } else if s.Container.WaitDelay > hst.WaitDelayMax {
+ kp.waitDelay = hst.WaitDelayMax
} else {
kp.waitDelay = s.Container.WaitDelay
}