Skip to content

Instantly share code, notes, and snippets.

@aladine
Created August 25, 2018 16:16
Show Gist options
  • Save aladine/232d63b0c81d66e9d5f2bd0b6d58c45c to your computer and use it in GitHub Desktop.
Save aladine/232d63b0c81d66e9d5f2bd0b6d58c45c to your computer and use it in GitHub Desktop.

Revisions

  1. aladine created this gist Aug 25, 2018.
    6 changes: 6 additions & 0 deletions command.go
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    // ErrMaxConcurrency occurs when too many of the same named command are executed at the same time.
    ErrMaxConcurrency = CircuitError{Message: "max concurrency"}
    // ErrCircuitOpen returns when an execution attempt "short circuits". This happens due to the circuit being measured as unhealthy.
    ErrCircuitOpen = CircuitError{Message: "circuit open"}
    // ErrTimeout occurs when the provided function takes too long to execute.
    ErrTimeout = CircuitError{Message: "timeout"}