Skip to content

Instantly share code, notes, and snippets.

View kwiesmueller's full-sized avatar

Kevin Wiesmüller kwiesmueller

  • Google
  • Kitchener, ON
View GitHub Profile
@kwiesmueller
kwiesmueller / intfloat_test.go
Last active May 9, 2019 14:33
put at staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/intfloat_test.go
package fieldmanager
import (
"errors"
"testing"
gojson "encoding/json"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
@kwiesmueller
kwiesmueller / main.go
Last active July 11, 2018 01:31
Channel based fanOut implementation in Golang with dynamic, threadsafe subscriptions and unsubscriptions sending and reveiving from a potential number of n publishers and subscribers. This implementation relies solely onto channels and does not use mutexes.
package main
import (
"context"
"fmt"
"math/rand"
"os"
"sync/atomic"
"time"