Skip to content

Instantly share code, notes, and snippets.

View andrewmeissner's full-sized avatar

Andrew Meissner andrewmeissner

  • CrowdStrike
  • Denver, CO
View GitHub Profile
@andrewmeissner
andrewmeissner / workerPools.go
Last active January 26, 2018 17:14
Worker Pools with receiving from Jobs channel, sending to Success, Retry, and Fail channels.
package main
import (
"fmt"
)
type channels struct {
jobs chan int
success chan int
retry chan int
@andrewmeissner
andrewmeissner / consulMutex.go
Last active January 11, 2018 06:08
Consul Mutex Go SDK
package main
import (
"fmt"
"math/rand"
"time"
"github.com/hashicorp/consul/api"
)