Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions commands/routing/use.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ type UseOK = commands.Unit
// CandidateUnavailable when none can serve it. Without a policy the reference
// is cleared and the space returns to default routing.
//
// The space MUST be provisioned with a provider (SpaceNotProvisioned) and the
// policy MUST be known to the upload service, i.e. have a stored candidate set
// The space MUST be provisioned with a provider; otherwise the invocation fails
// with InsufficientStorage (see access.InsufficientStorageErrorName). The policy
// MUST be known to the upload service, i.e. have a stored candidate set
// (UnknownPolicy).
//
// The receipt carries no payload (Unit).
var Use = binding.Bind[*UseArguments, *UseOK](command.MustParse("/routing/use"))

const (
// UnknownPolicyErrorName is the stable receipt-failure name when the
// referenced policy has no stored candidate set.
UnknownPolicyErrorName = "UnknownPolicy"
// SpaceNotProvisionedErrorName is the stable receipt-failure name when the
// subject space has no service provider.
SpaceNotProvisionedErrorName = "SpaceNotProvisioned"
)
// UnknownPolicyErrorName is the stable receipt-failure name when the
// referenced policy has no stored candidate set. A space with no service
// provider fails with the shared InsufficientStorage name from the access
// package, as every other capability on an unprovisioned space does.
const UnknownPolicyErrorName = "UnknownPolicy"