From ae7b343cde93bf59d2e3c7f6316d41c1474dd081 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 5 Oct 2025 17:40:32 +0900 Subject: hst: reword and move constants These values are considered part of the stable, exported API, so move them to hst. Signed-off-by: Ophestra --- internal/app/finalise.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/app/finalise.go') 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 } -- cgit v1.3.1