Skip to content

Commit

Permalink
fixups for initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
muir committed Jul 19, 2024
1 parent 8a59da0 commit 142c9f0
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

Expand All @@ -23,4 +23,8 @@ jobs:
- name: Run coverage
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v4.0.1
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ module github.com/memsql/keyeddistributor
go 1.18

require (
github.com/muir/nject v1.7.1
github.com/stretchr/testify v1.8.4
github.com/memsql/refcountmap v0.1.1
github.com/sharnoff/eventdistributor v0.1.1
github.com/stretchr/testify v1.9.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/muir/reflectutils v0.7.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/kr/text v0.1.0 // indirect
github.com/muir/gwrap v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
22 changes: 22 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/memsql/refcountmap v0.1.1 h1:tcYPE9pRlVv7uwbDUY2E+sjhD/zBRRWvPQ0pz8IIujg=
github.com/memsql/refcountmap v0.1.1/go.mod h1:kJR6RIBAI4iZgNo7hqQZZSmWWHNv+5t9X3RbOku86nk=
github.com/muir/gwrap v0.3.0 h1:hB/e3CBIvb0KkYDvTbJdajxZH6eoUbgSF/TYWbIkec4=
github.com/muir/gwrap v0.3.0/go.mod h1:VOGKgjhrLZ2TDcmZ5n2Kzd9KXUzPAfL3IIW6c/EJiWE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sharnoff/eventdistributor v0.1.1 h1:7OOcn2f9w5zGCjHm8KcIYKyp6y+W7xTNvo7rgnhWvvg=
github.com/sharnoff/eventdistributor v0.1.1/go.mod h1:OEKtalwdvbR4ZSEkNzMUTcu5aSaW+jRHjmamBlyTcqk=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
4 changes: 2 additions & 2 deletions keyed.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package keyed
package keyeddistributor

import (
"github.com/sharnoff/eventdistributor"

"singlestore.com/helios/util/refcountmap"
"github.com/memsql/refcountmap"
)

/*
Expand Down
6 changes: 3 additions & 3 deletions keyed_test.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package keyed_test
package keyeddistributor_test

import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"singlestore.com/helios/events/keyed"
"github.com/memsql/keyeddistributor"
)

type MyEvent struct {
id int
}

func TestKeyed(t *testing.T) {
distributor := keyed.New(func(e MyEvent) int {
distributor := keyeddistributor.New(func(e MyEvent) int {
return e.id % 4
})

Expand Down

0 comments on commit 142c9f0

Please sign in to comment.