Versions in this module Expand all Collapse all v2 v2.0.0 Feb 3, 2022 Changes in this version + var ErrCancelled = errors.New("cancelled acquiring mutex") + var ErrTimeout = errors.New("timeout acquiring mutex") + type Clock interface + After func(time.Duration) <-chan time.Time + Now func() time.Time + type Environment interface — darwin/amd64, js/wasm, linux/amd64 + Getenv func(string) string + LookupEnv func(string) (string, bool) + type Releaser interface + Release func() + func Acquire(spec Spec) (Releaser, error) + type Spec struct + Cancel <-chan struct{} + Clock Clock + Delay time.Duration + Name string + Timeout time.Duration + func (s *Spec) Validate() error