Queue is a Golang library for spawning and managing a Goroutine pool

Queue

Run Tests codecov

Queue is a Golang library for spawning and managing a Goroutine pool, Alloowing you to create multiple worker according to limit CPU number of machine.

Features

  • Support buffered channel queue.
  • Support NSQ (A realtime distributed messaging platform) as backend.
  • Support NATS (Connective Technology for Adaptive Edge & Distributed Systems) as backend.

Installation

Install the stable version:

go get github.com/golang-queue/queue

Install the latest verison:

go get github.com/golang-queue/queue@master

Usage

Basic usage of Pool (use Task function)

By calling QueueTask() method, it schedules the task executed by worker (goroutines) in the Pool.

package main

import (
  "context"
  "fmt"
  "time"

  "github.com/golang-queue/queue"
)

func main() {
  taskN := 100
  rets := make(chan string, taskN)

  // initial queue pool
  q := queue.NewPool(5)
  // shutdown the service and notify all the worker
  // wait all jobs are complete.
  defer q.Release()

  // assign tasks in queue
  for i := 0; i < taskN; i++ {
    go func(i int) {
      if err := q.QueueTask(func(ctx context.Context) error {
        rets <- fmt.Sprintf("Hi Gopher, handle the job: %02d", +i)
        return nil
      }); err != nil {
        panic(err)
      }
    }(i)
  }

  // wait until all tasks done
  for i := 0; i < taskN; i++ {
    fmt.Println("message:", <-rets)
    time.Sleep(20 * time.Millisecond)
  }
}

Basic usage of Pool (use message queue)

Define the new message struct and implement the Bytes() func to encode message. Give the WithFn func to handle the message from Queue.

package main

import (
  "context"
  "encoding/json"
  "fmt"
  "log"
  "time"

  "github.com/golang-queue/queue"
)

type job struct {
  Name    string
  Message string
}

func (j *job) Bytes() []byte {
  b, err := json.Marshal(j)
  if err != nil {
    panic(err)
  }
  return b
}

func main() {
  taskN := 100
  rets := make(chan string, taskN)

  // initial queue pool
  q := queue.NewPool(5, queue.WithFn(func(ctx context.Context, m queue.QueuedMessage) error {
    v, ok := m.(*job)
    if !ok {
      if err := json.Unmarshal(m.Bytes(), &v); err != nil {
        return err
      }
    }

    rets <- "Hi, " + v.Name + ", " + v.Message
    return nil
  }))
  // shutdown the service and notify all the worker
  // wait all jobs are complete.
  defer q.Release()

  // assign tasks in queue
  for i := 0; i < taskN; i++ {
    go func(i int) {
      if err := q.Queue(&job{
        Name:    "Gopher",
        Message: fmt.Sprintf("handle the job: %d", i+1),
      }); err != nil {
        log.Println(err)
      }
    }(i)
  }

  // wait until all tasks done
  for i := 0; i < taskN; i++ {
    fmt.Println("message:", <-rets)
    time.Sleep(50 * time.Millisecond)
  }
}
Comments
  • chore(job): optimized memory allocation

    chore(job): optimized memory allocation

    old

    goos: linux
    goarch: amd64
    pkg: github.com/golang-queue/queue
    cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
    BenchmarkQueueTask
    BenchmarkQueueTask-2         	 7688836	       137.1 ns/op	      99 B/op	       2 allocs/op
    BenchmarkQueueTask-2         	 7391805	       161.6 ns/op	     101 B/op	       2 allocs/op
    BenchmarkQueueTask-2         	 7356476	       180.4 ns/op	     101 B/op	       2 allocs/op
    BenchmarkQueueTask-2         	 6143602	       201.7 ns/op	     101 B/op	       2 allocs/op
    BenchmarkQueueTask-2         	 5050410	       201.0 ns/op	     102 B/op	       2 allocs/op
    BenchmarkQueue
    BenchmarkQueue-2             	 1777933	       747.7 ns/op	     290 B/op	       5 allocs/op
    BenchmarkQueue-2             	 1415230	       794.5 ns/op	     294 B/op	       6 allocs/op
    BenchmarkQueue-2             	 1659774	      1007 ns/op	     299 B/op	       6 allocs/op
    BenchmarkQueue-2             	 1674228	       785.8 ns/op	     292 B/op	       6 allocs/op
    BenchmarkQueue-2             	 1369141	      2739 ns/op	     290 B/op	       5 allocs/op
    BenchmarkConsumerPayload
    BenchmarkConsumerPayload-2   	  433586	      2892 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerPayload-2   	  555051	      2631 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerPayload-2   	  549049	      2700 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerPayload-2   	  522826	      2254 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerPayload-2   	  543097	      2167 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerTask
    BenchmarkConsumerTask-2      	  590689	      1925 ns/op	     592 B/op	      10 allocs/op
    BenchmarkConsumerTask-2      	  600896	      1917 ns/op	     592 B/op	      10 allocs/op
    BenchmarkConsumerTask-2      	  548496	      1919 ns/op	     592 B/op	      10 allocs/op
    BenchmarkConsumerTask-2      	  547576	      1947 ns/op	     592 B/op	      10 allocs/op
    BenchmarkConsumerTask-2      	  595194	      1947 ns/op	     592 B/op	      10 allocs/op
    BenchmarkNewTask
    BenchmarkNewTask-2     	11069827	       107.8 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewTask-2     	10980966	       107.4 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewTask-2     	11049184	       107.8 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewTask-2     	11085979	       107.3 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewTask-2     	10908338	       107.6 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewOption
    BenchmarkNewOption-2   	11046718	       107.9 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewOption-2   	10913220	       108.2 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewOption-2   	10924417	       111.5 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewOption-2   	11088232	       108.9 ns/op	      72 B/op	       4 allocs/op
    BenchmarkNewOption-2   	11000745	       109.4 ns/op	      72 B/op	       4 allocs/op
    

    New

    goos: linux
    goarch: amd64
    pkg: github.com/golang-queue/queue
    cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
    BenchmarkQueueTask
    BenchmarkQueueTask-2         	12296089	       104.9 ns/op	      72 B/op	       1 allocs/op
    BenchmarkQueueTask-2         	10956156	       113.6 ns/op	      73 B/op	       1 allocs/op
    BenchmarkQueueTask-2         	12407688	       132.6 ns/op	      72 B/op	       1 allocs/op
    BenchmarkQueueTask-2         	12778882	       137.2 ns/op	      73 B/op	       1 allocs/op
    BenchmarkQueueTask-2         	 9458818	       144.6 ns/op	      73 B/op	       1 allocs/op
    BenchmarkQueue
    BenchmarkQueue-2             	  493566	      7608 ns/op	     278 B/op	       5 allocs/op
    BenchmarkQueue-2             	 1866391	       617.2 ns/op	     272 B/op	       5 allocs/op
    BenchmarkQueue-2             	 1642077	       640.4 ns/op	     272 B/op	       5 allocs/op
    BenchmarkQueue-2             	 1896705	       694.9 ns/op	     265 B/op	       4 allocs/op
    BenchmarkQueue-2             	  500755	     17309 ns/op	     260 B/op	       4 allocs/op
    BenchmarkConsumerPayload
    BenchmarkConsumerPayload-2   	  478116	      2437 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerPayload-2   	  493172	      2491 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerPayload-2   	  556701	      2495 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerPayload-2   	  535084	      2203 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerPayload-2   	  508018	      2211 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerTask
    BenchmarkConsumerTask-2      	  573092	      1938 ns/op	     592 B/op	      10 allocs/op
    BenchmarkConsumerTask-2      	  547263	      1948 ns/op	     592 B/op	      10 allocs/op
    BenchmarkConsumerTask-2      	  576758	      1926 ns/op	     592 B/op	      10 allocs/op
    BenchmarkConsumerTask-2      	  571465	      1950 ns/op	     592 B/op	      10 allocs/op
    BenchmarkConsumerTask-2      	  575342	      1935 ns/op	     592 B/op	      10 allocs/op
    BenchmarkNewTask
    BenchmarkNewTask-2     	294638179	         4.062 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewTask-2     	295681586	         4.067 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewTask-2     	295283884	         4.058 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewTask-2     	293375212	         4.078 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewTask-2     	294573591	         4.043 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewOption
    BenchmarkNewOption-2   	297229272	         4.048 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewOption-2   	297776034	         4.037 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewOption-2   	294032257	         4.046 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewOption-2   	296694416	         4.054 ns/op	       0 B/op	       0 allocs/op
    BenchmarkNewOption-2   	293353922	         4.039 ns/op	       0 B/op	       0 allocs/op
    

    Result

    $ benchstat a.txt b.txt 
    name               old time/op    new time/op    delta
    QueueTask-2           176ns ±22%     127ns ±17%   -28.23%  (p=0.032 n=5+5)
    Queue-2             1.21µs ±125%   5.37µs ±222%      ~     (p=0.690 n=5+5)
    ConsumerPayload-2    2.53µs ±14%    2.37µs ± 7%      ~     (p=0.421 n=5+5)
    ConsumerTask-2       1.93µs ± 1%    1.94µs ± 1%      ~     (p=0.198 n=5+5)
    NewTask-2             108ns ± 0%       4ns ± 0%   -96.22%  (p=0.008 n=5+5)
    NewOption-2           109ns ± 2%       4ns ± 0%   -96.30%  (p=0.008 n=5+5)
    
    name               old alloc/op   new alloc/op   delta
    QueueTask-2            101B ± 2%       73B ± 1%   -27.98%  (p=0.008 n=5+5)
    Queue-2                293B ± 2%      269B ± 3%    -8.05%  (p=0.008 n=5+5)
    ConsumerPayload-2      624B ± 0%      624B ± 0%      ~     (all equal)
    ConsumerTask-2         592B ± 0%      592B ± 0%      ~     (all equal)
    NewTask-2             72.0B ± 0%      0.0B       -100.00%  (p=0.008 n=5+5)
    NewOption-2           72.0B ± 0%      0.0B       -100.00%  (p=0.008 n=5+5)
    
    name               old allocs/op  new allocs/op  delta
    QueueTask-2            2.00 ± 0%      1.00 ± 0%   -50.00%  (p=0.008 n=5+5)
    Queue-2                5.60 ±11%      4.60 ±13%      ~     (p=0.079 n=5+5)
    ConsumerPayload-2      11.0 ± 0%      11.0 ± 0%      ~     (all equal)
    ConsumerTask-2         10.0 ± 0%      10.0 ± 0%      ~     (all equal)
    NewTask-2              4.00 ± 0%      0.00       -100.00%  (p=0.008 n=5+5)
    NewOption-2            4.00 ± 0%      0.00       -100.00%  (p=0.008 n=5+5)
    

    Signed-off-by: Bo-Yi.Wu [email protected]

  • chore(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1

    chore(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1

    Bumps github.com/stretchr/testify from 1.8.0 to 1.8.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • chore(deps): bump actions/setup-go from 2 to 3

    chore(deps): bump actions/setup-go from 2 to 3

    Bumps actions/setup-go from 2 to 3.

    Release notes

    Sourced from actions/setup-go's releases.

    Update actions/cache version to 3.0.0

    In scope of this release we updated actions/cache package as the new version contains fixes for caching error handling

    v3.0.0

    What's Changed

    Breaking Changes

    With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

    This new major release removes the stable input, so there is no need to specify additional input to use pre-release versions. This release also corrects the pre-release versions syntax to satisfy the SemVer notation (1.18.0-beta1 -> 1.18.0-beta.1, 1.18.0-rc1 -> 1.18.0-rc.1).

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v3
        with:
          go-version: '1.18.0-rc.1' 
      - run: go version
    

    Add check-latest input

    In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded from go-versions repository. By default check-latest is set to false. Example of usage:

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2
        with:
          go-version: '1.16'
          check-latest: true
      - run: go version
    

    Moreover, we updated @actions/core from 1.2.6 to 1.6.0

    v2.1.5

    In scope of this release we updated matchers.json to improve the problem matcher pattern. For more information please refer to this pull request

    v2.1.4

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4

    v2.1.3

    • Updated communication with runner to use environment files rather then workflow commands

    ... (truncated)

    Commits
    • 268d8c0 Add support for arm32 go arch (#253)
    • f279813 Merge pull request #250 from jromero/feature/windows-download-filename
    • 1022489 Merge pull request #249 from e-korolevskii/main
    • e0dce94 Use explicit filename when downloading Windows go package
    • dab57c7 update docs
    • f2e56d8 Merge pull request #246 from e-korolevskii/Update-contributors-guide
    • edd0aca update tests path
    • f3e3b7c Update docs/contributors.md
    • 4a0c081 Update docs/contributors.md
    • 185e7f2 Update docs/contributors.md
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • "go get" (install) on this repository is throwing build error on "!errors.Is(...)" - is it my go version?

    Hi,

    Doing a "go get" (install) on this repository is throwing build errors on "!errors.Is(...)" - is it my go version?

    I've got an older version of Go: go.1.12.1 (win/amd64) - is "errors.Is()" more recent?

    I'm relatively new to Go, so please point me in the right direction if I'm being silly...

    Thanks.

    EDIT: Oh my... I just found out that go1.13 added error.Is() LOL!!!

    Any sage advice on a workaround? I'm stuck with 1.12 for now. I'll try to edit the local source in the meantime.

  • chore(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.5

    chore(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.5

    Bumps github.com/stretchr/testify from 1.7.3 to 1.7.5.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • chore(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2

    chore(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2

    Bumps github.com/stretchr/testify from 1.7.1 to 1.7.2.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • chore(consumer): performance tinning

    chore(consumer): performance tinning

    BenchmarkConsumerRunUnmarshal
    BenchmarkConsumerRunUnmarshal-2   	  494060	      2644 ns/op	     624 B/op	      11 allocs/op
    BenchmarkConsumerRunTask
    BenchmarkConsumerRunTask-2        	  631615	      2368 ns/op	     592 B/op	      10 allocs/op
    PASS
    ok  	github.com/golang-queue/queue	6.979s
    
  • test(benchmark): add queue performance check

    test(benchmark): add queue performance check

    Before

    49894bf

    goos: linux
    goarch: amd64
    pkg: github.com/golang-queue/queue
    cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
    BenchmarkQueueTask
    INFO: 2022/05/29 04:18:27 logger.go:35: shutdown all tasks: 5 workers
    BenchmarkQueueTask-2   	     584	   2079968 ns/op	    1801 B/op	      30 allocs/op
    BenchmarkQueue
    INFO: 2022/05/29 04:18:28 logger.go:35: shutdown all tasks: 5 workers
    INFO: 2022/05/29 04:18:28 logger.go:35: shutdown all tasks: 5 workers
    INFO: 2022/05/29 04:18:29 logger.go:35: shutdown all tasks: 5 workers
    BenchmarkQueue-2       	 1892185	       624.9 ns/op	     214 B/op	       5 allocs/op
    PASS
    ok  	github.com/golang-queue/queue	2.924s
    

    5d2819e

    goos: linux
    goarch: amd64
    pkg: github.com/golang-queue/queue
    cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
    BenchmarkQueueTask
    BenchmarkQueueTask-2   	     582	   2055769 ns/op	    1403 B/op	      22 allocs/op
    BenchmarkQueue
    INFO: 2022/05/29 06:47:35 logger.go:35: shutdown all tasks: 4 workers
    INFO: 2022/05/29 06:47:36 logger.go:35: shutdown all tasks: 5 workers
    INFO: 2022/05/29 06:47:37 logger.go:35: shutdown all tasks: 4 workers
    BenchmarkQueue-2       	 1996585	       616.1 ns/op	     212 B/op	       5 allocs/op
    PASS
    ok  	github.com/golang-queue/queue	2.932s
    

    15c43ec remove wait time in benchmark

    After

    goos: linux
    goarch: amd64
    pkg: github.com/golang-queue/queue
    cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
    BenchmarkQueueTask
    INFO: 2022/05/29 14:53:36 logger.go:35: shutdown all tasks: 5 workers
    INFO: 2022/05/29 14:53:36 logger.go:35: shutdown all tasks: 4 workers
    INFO: 2022/05/29 14:53:37 logger.go:35: shutdown all tasks: 5 workers
    INFO: 2022/05/29 14:53:38 logger.go:35: shutdown all tasks: 5 workers
    BenchmarkQueueTask-2   	14850574	        86.25 ns/op	      54 B/op	       1 allocs/op
    BenchmarkQueue
    INFO: 2022/05/29 14:53:38 logger.go:35: shutdown all tasks: 5 workers
    INFO: 2022/05/29 14:53:38 logger.go:35: shutdown all tasks: 5 workers
    INFO: 2022/05/29 14:53:39 logger.go:35: shutdown all tasks: 5 workers
    INFO: 2022/05/29 14:53:40 logger.go:35: shutdown all tasks: 5 workers
    BenchmarkQueue-2       	 2270523	       484.3 ns/op	     191 B/op	       4 allocs/op
    PASS
    ok  	github.com/golang-queue/queue	3.738s
    
  • chore(deps): bump goreleaser/goreleaser-action from 2 to 3

    chore(deps): bump goreleaser/goreleaser-action from 2 to 3

    Bumps goreleaser/goreleaser-action from 2 to 3.

    Release notes

    Sourced from goreleaser/goreleaser-action's releases.

    v3.0.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v2.9.1...v3.0.0

    v2.9.1

    What's Changed

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v2...v2.9.1

    v2.9.0

    What's Changed

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v2.8.1...v2.9.0

    v2.8.1

    What's Changed

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v2.8.0...v2.8.1

    v2.8.0

    What's Changed

    ... (truncated)

    Commits
    • 68acf3b chore(deps): bump @​actions/tool-cache from 1.7.2 to 2.0.1 (#355)
    • 46da113 chore: node 16 as default runtime (#343)
    • 223909a chore: update
    • c56d8df Revert "chore(deps): bump @​actions/core from 1.6.0 to 1.8.2 (#354)"
    • d1c2f83 chore(deps): bump @​actions/core from 1.6.0 to 1.8.2 (#354)
    • 5c65fd8 chore(deps): bump @​actions/http-client from 1.0.11 to 2.0.1 (#353)
    • 46cd12b chore(deps): bump yargs from 17.4.1 to 17.5.1 (#352)
    • 822d1bf chore(deps): bump docker/bake-action from 1 to 2 (#346)
    • c25888f chore: update dev dependencies and workflow (#342)
    • ec57748 chore(deps): bump yargs from 17.4.0 to 17.4.1 (#339)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • chore(deps): bump github/codeql-action from 1 to 2

    chore(deps): bump github/codeql-action from 1 to 2

    Bumps github/codeql-action from 1 to 2.

    Changelog

    Sourced from github/codeql-action's changelog.

    2.1.8 - 08 Apr 2022

    • Update default CodeQL bundle version to 2.8.5. #1014
    • Fix error where the init action would fail due to a GitHub API request that was taking too long to complete #1025

    2.1.7 - 05 Apr 2022

    • A bug where additional queries specified in the workflow file would sometimes not be respected has been fixed. #1018

    2.1.6 - 30 Mar 2022

    • [v2+ only] The CodeQL Action now runs on Node.js v16. #1000
    • Update default CodeQL bundle version to 2.8.4. #990
    • Fix a bug where an invalid commit_oid was being sent to code scanning when a custom checkout path was being used. #956
    Commits
    • 2c03704 Allow the version of the ML-powered pack to depend on the CLI version
    • dd6b592 Simplify ML-powered query status report definition
    • a90d8bf Merge pull request #1011 from github/henrymercer/ml-powered-queries-pr-check
    • dc0338e Use latest major version of actions/upload-artifact
    • 57096fe Add a PR check to validate that ML-powered queries are run correctly
    • b0ddf36 Merge pull request #1012 from github/henrymercer/update-actions-major-versions
    • 1ea2f2d Merge branch 'main' into henrymercer/update-actions-major-versions
    • 9dcc141 Merge pull request #1010 from github/henrymercer/stop-running-ml-powered-quer...
    • ea751a9 Update other Actions from v2 to v3
    • a2949f4 Update actions/checkout from v2 to v3
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • chore(deps): bump codecov/codecov-action from 2 to 3

    chore(deps): bump codecov/codecov-action from 2 to 3

    Bumps codecov/codecov-action from 2 to 3.

    Release notes

    Sourced from codecov/codecov-action's releases.

    v3.0.0

    Breaking Changes

    • #689 Bump to node16 and small fixes

    Features

    • #688 Incorporate gcov arguments for the Codecov uploader

    Dependencies

    • #548 build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
    • #603 [Snyk] Upgrade @​actions/core from 1.5.0 to 1.6.0
    • #628 build(deps): bump node-fetch from 2.6.1 to 3.1.1
    • #634 build(deps): bump node-fetch from 3.1.1 to 3.2.0
    • #636 build(deps): bump openpgp from 5.0.1 to 5.1.0
    • #652 build(deps-dev): bump @​vercel/ncc from 0.30.0 to 0.33.3
    • #653 build(deps-dev): bump @​types/node from 16.11.21 to 17.0.18
    • #659 build(deps-dev): bump @​types/jest from 27.4.0 to 27.4.1
    • #667 build(deps): bump actions/checkout from 2 to 3
    • #673 build(deps): bump node-fetch from 3.2.0 to 3.2.3
    • #683 build(deps): bump minimist from 1.2.5 to 1.2.6
    • #685 build(deps): bump @​actions/github from 5.0.0 to 5.0.1
    • #681 build(deps-dev): bump @​types/node from 17.0.18 to 17.0.23
    • #682 build(deps-dev): bump typescript from 4.5.5 to 4.6.3
    • #676 build(deps): bump @​actions/exec from 1.1.0 to 1.1.1
    • #675 build(deps): bump openpgp from 5.1.0 to 5.2.1

    v2.1.0

    2.1.0

    Features

    • #515 Allow specifying version of Codecov uploader

    Dependencies

    • #499 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • #508 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • #514 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0

    v2.0.3

    2.0.3

    Fixes

    • #464 Fix wrong link in the readme
    • #485 fix: Add override OS and linux default to platform

    Dependencies

    • #447 build(deps): bump openpgp from 5.0.0-4 to 5.0.0-5
    • #458 build(deps-dev): bump eslint from 7.31.0 to 7.32.0
    • #465 build(deps-dev): bump @​typescript-eslint/eslint-plugin from 4.28.4 to 4.29.1
    • #466 build(deps-dev): bump @​typescript-eslint/parser from 4.28.4 to 4.29.1
    • #468 build(deps-dev): bump @​types/jest from 26.0.24 to 27.0.0
    • #470 build(deps-dev): bump @​types/node from 16.4.0 to 16.6.0
    • #472 build(deps): bump path-parse from 1.0.6 to 1.0.7
    • #473 build(deps-dev): bump @​types/jest from 27.0.0 to 27.0.1

    ... (truncated)

    Changelog

    Sourced from codecov/codecov-action's changelog.

    3.1.0

    Features

    • #699 Incorporate xcode arguments for the Codecov uploader

    Dependencies

    • #694 build(deps-dev): bump @​vercel/ncc from 0.33.3 to 0.33.4
    • #696 build(deps-dev): bump @​types/node from 17.0.23 to 17.0.25
    • #698 build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0

    3.0.0

    Breaking Changes

    • #689 Bump to node16 and small fixes

    Features

    • #688 Incorporate gcov arguments for the Codecov uploader

    Dependencies

    • #548 build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
    • #603 [Snyk] Upgrade @​actions/core from 1.5.0 to 1.6.0
    • #628 build(deps): bump node-fetch from 2.6.1 to 3.1.1
    • #634 build(deps): bump node-fetch from 3.1.1 to 3.2.0
    • #636 build(deps): bump openpgp from 5.0.1 to 5.1.0
    • #652 build(deps-dev): bump @​vercel/ncc from 0.30.0 to 0.33.3
    • #653 build(deps-dev): bump @​types/node from 16.11.21 to 17.0.18
    • #659 build(deps-dev): bump @​types/jest from 27.4.0 to 27.4.1
    • #667 build(deps): bump actions/checkout from 2 to 3
    • #673 build(deps): bump node-fetch from 3.2.0 to 3.2.3
    • #683 build(deps): bump minimist from 1.2.5 to 1.2.6
    • #685 build(deps): bump @​actions/github from 5.0.0 to 5.0.1
    • #681 build(deps-dev): bump @​types/node from 17.0.18 to 17.0.23
    • #682 build(deps-dev): bump typescript from 4.5.5 to 4.6.3
    • #676 build(deps): bump @​actions/exec from 1.1.0 to 1.1.1
    • #675 build(deps): bump openpgp from 5.1.0 to 5.2.1

    2.1.0

    Features

    • #515 Allow specifying version of Codecov uploader

    Dependencies

    • #499 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • #508 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • #514 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0

    2.0.3

    Fixes

    • #464 Fix wrong link in the readme
    • #485 fix: Add override OS and linux default to platform

    Dependencies

    • #447 build(deps): bump openpgp from 5.0.0-4 to 5.0.0-5

    ... (truncated)

    Commits
    • 81cd2dc Merge pull request #699 from codecov/feat-xcode
    • a03184e feat: add xcode support
    • 6a6a9ae Merge pull request #694 from codecov/dependabot/npm_and_yarn/vercel/ncc-0.33.4
    • 92a872a Merge pull request #696 from codecov/dependabot/npm_and_yarn/types/node-17.0.25
    • 43a9c18 Merge pull request #698 from codecov/dependabot/npm_and_yarn/jest-junit-13.2.0
    • 13ce822 Merge pull request #690 from codecov/ci-v3
    • 4d6dbaa build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0
    • 98f0f19 build(deps-dev): bump @​types/node from 17.0.23 to 17.0.25
    • d3021d9 build(deps-dev): bump @​vercel/ncc from 0.33.3 to 0.33.4
    • 2c83f35 Update makefile to v3
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Related tags
:speedboat: a limited consumer goroutine or unlimited goroutine pool for easier goroutine handling and cancellation

Package pool Package pool implements a limited consumer goroutine or unlimited goroutine pool for easier goroutine handling and cancellation. Features

Jan 1, 2023
🐜🐜🐜 ants is a high-performance and low-cost goroutine pool in Go, inspired by fasthttp./ ants 是一个高性能且低损耗的 goroutine 池。
🐜🐜🐜 ants is a high-performance and low-cost goroutine pool in Go, inspired by fasthttp./ ants 是一个高性能且低损耗的 goroutine 池。

A goroutine pool for Go English | ???? 中文 ?? Introduction Library ants implements a goroutine pool with fixed capacity, managing and recycling a massi

Jan 2, 2023
golang worker pool , Concurrency limiting goroutine pool

golang worker pool 中文说明 Concurrency limiting goroutine pool. Limits the concurrency of task execution, not the number of tasks queued. Never blocks su

Dec 19, 2022
Unlimited job queue for go, using a pool of concurrent workers processing the job queue entries

kyoo: A Go library providing an unlimited job queue and concurrent worker pools About kyoo is the phonetic transcription of the word queue. It provide

Dec 21, 2022
goroutine pool in golang

goroutine pool in golang

Nov 1, 2021
🐝 A Highly Performant and easy to use goroutine pool for Go
🐝 A Highly Performant and easy to use goroutine pool for Go

gohive Package gohive implements a simple and easy to use goroutine pool for Go Features Pool can be created with a specific size as per the requireme

Sep 26, 2022
Minimalistic and High-performance goroutine worker pool written in Go

pond Minimalistic and High-performance goroutine worker pool written in Go Motivation This library is meant to provide a simple way to limit concurren

Dec 22, 2022
Lightweight Goroutine pool

grpool Lightweight Goroutine pool Clients can submit jobs. Dispatcher takes job, and sends it to first available worker. When worker is done with proc

Dec 6, 2022
A goroutine pool for Go
A goroutine pool for Go

Tunny is a Golang library for spawning and managing a goroutine pool, allowing you to limit work coming from any number of goroutines with a synchrono

Dec 31, 2022
Concurrency limiting goroutine pool

workerpool Concurrency limiting goroutine pool. Limits the concurrency of task execution, not the number of tasks queued. Never blocks submitting task

Dec 28, 2022
Golang Implementation of Worker Pool/ Thread Pool

Golang Implementation of Worker Pool/ Thread Pool

Jun 18, 2022
Go-miningcore-pool - Miningcore Pool written in GOlang

Go-Miningcore-Pool (COMING SOON) Miningcore Pool written in GOlang 0x01 Configur

Apr 24, 2022
Go-ldap-pool - A simple connection pool for go-ldap

Basic connection pool for go-ldap This little library use the go-ldap library an

Dec 17, 2022
Work pool channlege - An url hash retriever worker pool for getting hash digest for a collection of urls

Code challenge The aim of this project is to provide an url hash retriever worke

Feb 16, 2022
A simple and useful goroutine concurrent library.

Taskgroup A simple and useful goroutine concurrent library. Installation go get github.com/anthhub/taskgroup

May 19, 2021
Provides some convenient API, includes Goid(), AllGoid(), and LocalStorage, which is a goroutine's local storage, just like ThreadLocal in other languages.

routine 中文版 routine encapsulates and provides some easy-to-use, high-performance goroutine context access interfaces, which can help you access corout

Dec 30, 2022
A cross goroutine storage tool with very simple implementation and function.

Simple-goroutine-local is a cross goroutine storage tool with very simple implementation and function (the concept is similar to Java ThreadLocal). Ge

Jan 13, 2022
errgroup with goroutine worker limits

neilotoole/errgroup neilotoole/errgroup is a drop-in alternative to Go's wonderful sync/errgroup but limited to N goroutines. This is useful for inter

Dec 15, 2022
Waiting group for collecting goroutine information.

在go语言waitGroup和errGroup都是用来控制goroutine的并发的方式,前者只能等待所有goroutine执行完成之后再执行Wait()函数后面的代码并且不

Dec 3, 2021