Documentation
¶
Overview ¶
Package speed owns the cross-surface ACP speed vocabulary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolutionReasonValues ¶
func ResolutionReasonValues() []string
ResolutionReasonValues returns the canonical non-applied reason vocabulary.
func ResolutionStatusValues ¶
func ResolutionStatusValues() []string
ResolutionStatusValues returns the canonical outcome vocabulary.
func ValidateResolution ¶
func ValidateResolution(value Resolution) error
ValidateResolution ensures an outcome uses a canonical status and reason pair.
Types ¶
type Resolution ¶
type Resolution struct {
Requested Speed `json:"requested"`
Status ResolutionStatus `json:"status"`
Reason ResolutionReason `json:"reason,omitempty"`
}
Resolution records one requested speed and its runtime outcome.
func CloneResolution ¶
func CloneResolution(value *Resolution) *Resolution
CloneResolution returns an independent resolution snapshot.
type ResolutionReason ¶
type ResolutionReason string
ResolutionReason explains why a speed request was not applied.
const ( ReasonCapabilityAbsent ResolutionReason = "capability_absent" ReasonCapabilityAmbiguous ResolutionReason = "capability_ambiguous" ReasonValueAmbiguous ResolutionReason = "value_ambiguous" ReasonProviderRejected ResolutionReason = "provider_rejected" )
type ResolutionStatus ¶
type ResolutionStatus string
ResolutionStatus identifies the outcome of applying a speed request.
const ( ResolutionApplied ResolutionStatus = "applied" ResolutionUnsupported ResolutionStatus = "unsupported" ResolutionRejected ResolutionStatus = "rejected" )
Click to show internal directories.
Click to hide internal directories.