# README
go-ipfs-delay
go-ipfs-delay makes it easy to add (threadsafe) configurable delays to other objects.
Table of Contents
Install
go-ipfs-delay
works like a regular Go module:
> go get github.com/ipfs/go-ipfs-delay
Usage
import "github.com/ipfs/go-ipfs-delay"
Check the GoDoc documentation
Contribute
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
License
MIT © Protocol Labs, Inc.
# Functions
Delay generates a generic delay form a t, a sleeper, and a generator.
Fixed returns a delay with fixed latency.
FixedGenerator returns a delay with fixed latency.
VariableNormal is a delay following a normal distribution Notice that to implement the D interface Set can only change the mean delay the standard deviation is set only at initialization.
VariableNormalGenerator makes delays that following a normal distribution.
VariableUniform is a delay following a uniform distribution Notice that to implement the D interface Set can only change the minimum delay the delta is set only at initialization.
VariableUniformGenerator generates delays following a uniform distribution.