Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
Descriptor is one distribution as documentation and completions see it.
func Distributions ¶
func Distributions() []Descriptor
Distributions describes the call forms, in documentation order.
func (Descriptor) Usage ¶
func (d Descriptor) Usage() string
Usage is the example call, e.g. random(100ms,500ms).
type Spec ¶
type Spec struct {
// contains filtered or unexported fields
}
Spec is one parsed delay expression; the zero value never delays. What base and spread hold depends on the kind: the constant delay, the bounds of random, or a center and the deviation around it. A deviation written as a percentage is marked relative so the text round-trips.
func (Spec) MarshalText ¶
The mock reload digest hashes parsed specs as JSON, so a spec has to encode as the text it was written with.
func (Spec) Sample ¶
Sample returns the delay for one request. It is never negative and is safe for concurrent use.