package hostguard import "context" // WithLocal holds the existing host lock for local bookkeeping or cleanup. // It grants no claim, installation, spawn or write authority. Ordinary host // work must still use With. The callback must not wait on a network request. func (g Guard) WithLocal(ctx context.Context, host string, fn func() error) error { if fn == nil { return ErrInvalidInput } return g.locked(ctx, host, func(_ *recordDir) error { return fn() }) }