Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

mod/vendor: update panjf2000/ants to latest v2 release. #72

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/mattn/go-isatty v0.0.7
github.com/oklog/run v1.0.0
github.com/panjf2000/ants v0.0.0-20190820151255-b60dfa8c16b0
github.com/panjf2000/ants/v2 v2.1.1
github.com/pkg/errors v0.8.1
github.com/rs/zerolog v1.14.3
github.com/ryanuber/columnize v2.1.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQz
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/panjf2000/ants v0.0.0-20190820151255-b60dfa8c16b0 h1:otVy5M/CL7sQJRx9MxpFq3feQp7AEgx1Hp4/RPBRqkE=
github.com/panjf2000/ants v0.0.0-20190820151255-b60dfa8c16b0/go.mod h1:AaACblRPzq35m1g3enqYcxspbbiOJJYaxU2wMpm1cXY=
github.com/panjf2000/ants/v2 v2.1.1 h1:Or1KjIoVSdiWAh9553KI6vmBoMqEo0lqRcwS9v86+ts=
github.com/panjf2000/ants/v2 v2.1.1/go.mod h1:1GFm8bV8nyCQvU5K4WvBCTG1/YBFOD2VzjffD8fV55A=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
Expand Down
10 changes: 2 additions & 8 deletions pkg/autoscale/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/jrasell/sherpa/pkg/policy"
policyBackend "github.com/jrasell/sherpa/pkg/policy/backend"
"github.com/jrasell/sherpa/pkg/scale"
"github.com/panjf2000/ants"
ants "github.com/panjf2000/ants/v2"
"github.com/rs/zerolog"
)

Expand Down Expand Up @@ -156,13 +156,7 @@ func (a *AutoScale) setScalingInProgressFalse() {
// createWorkerPool is responsible for building the ants goroutine worker pool with the number of
// threads controlled by the operator configured value.
func (a *AutoScale) createWorkerPool() (*ants.PoolWithFunc, error) {
return ants.NewPoolWithFunc(
ants.Options{
Capacity: a.cfg.ScalingThreads,
ExpiryDuration: 60 * time.Second,
PoolFunc: a.workerPoolFunc(),
},
)
return ants.NewPoolWithFunc(a.cfg.ScalingThreads, a.workerPoolFunc(), ants.WithExpiryDuration(60*time.Second))
}

func (a *AutoScale) workerPoolFunc() func(payload interface{}) {
Expand Down
1 change: 0 additions & 1 deletion vendor/github.com/panjf2000/ants/go.mod

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 76 additions & 0 deletions vendor/github.com/panjf2000/ants/v2/CODE_OF_CONDUCT.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions vendor/github.com/panjf2000/ants/v2/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading