Skip to content

Commit

Permalink
docs(README.md): update go documentation (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 29, 2023
1 parent 4e39194 commit c1ffcf6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ seen on our [Benchmark Report Card].

## Usage

```go
const MinLife = time.Millisecond
```
MinLife is the minimum life time for the scaler. This is used to prevent the
scaler from exiting too quickly, and causing too small of a lifetime.

```go
const MinWait = time.Millisecond
```
MinWait is the absolute minimum wait time for the ticker. This is used to
prevent the ticker from firing too often and causing too small of a wait time.

```go
var ErrFnRequired = fmt.Errorf("nil InterceptFunc, Fn is required")
```
Expand Down Expand Up @@ -177,6 +189,10 @@ type Scaler[T, U any] struct {
// times the Scaler has scaled up. This is useful for systems
// that are CPU bound and need to scale up more/less quickly.
WaitModifier DurationScaler

// Max is the maximum number of layer2 routines that will be spawned.
// If Max is set to 0, then there is no limit.
Max uint
}
```

Expand Down

0 comments on commit c1ffcf6

Please sign in to comment.