Skip to content

Commit

Permalink
Merge branch 'master' of github.com:aaronland/go-brooklynintegers-api
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisaaronland committed Feb 24, 2020
2 parents 6a15af3 + f22e4de commit 3544de0
Show file tree
Hide file tree
Showing 17 changed files with 375 additions and 154 deletions.
7 changes: 7 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package api

import (
"context"
"errors"
"fmt"
"github.com/aaronland/go-artisanal-integers"
Expand All @@ -13,6 +14,12 @@ import (
"github.com/cenkalti/backoff/v4"
)

func init() {
ctx := context.Background()
cl := NewAPIClient()
artisanalinteger.RegisterClient(ctx, "brooklynintegers", cl)
}

// this is basically just so we can preserve backwards compatibility
// even though the artisanalinteger.Client interface is the new new
// (20181210/thisisaaronland)
Expand Down
14 changes: 11 additions & 3 deletions cmd/int/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package main

import (
"bufio"
"context"
"flag"
"fmt"
"github.com/aaronland/go-brooklynintegers-api"
"github.com/aaronland/go-artisanal-integers"
_ "github.com/aaronland/go-brooklynintegers-api"
"io"
"log"
"os"
Expand All @@ -22,15 +24,21 @@ func main() {

flag.Parse()

ctx := context.Background()

client, err := artisanalinteger.NewClient(ctx, "brooklynintegers://")

if err != nil {
log.Fatal(err)
}

writers := []io.Writer{
os.Stdout,
}

multi := io.MultiWriter(writers...)
writer := bufio.NewWriter(multi)

client := api.NewAPIClient()

wg := new(sync.WaitGroup)
mu := new(sync.Mutex)

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/aaronland/go-brooklynintegers-api
go 1.12

require (
github.com/aaronland/go-artisanal-integers v0.1.0
github.com/aaronland/go-artisanal-integers v0.1.1
github.com/cenkalti/backoff/v4 v4.0.0
github.com/tidwall/gjson v1.3.5
github.com/tidwall/gjson v1.5.0
go.uber.org/ratelimit v0.1.0
)
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
github.com/aaronland/go-artisanal-integers v0.1.0 h1:WN00aqbjfElOD8dUngFMOdd9wEWW0vyitnOMSRaNqsk=
github.com/aaronland/go-artisanal-integers v0.1.0/go.mod h1:00F0qOpuZZkzWiSSEQYk6Ul1Oc5kwgcYgsfYRmuR+wY=
github.com/aaronland/go-artisanal-integers v0.1.1 h1:bLQmWqcqgPT1NOJFwJtZZ9O/QTnttO54ODiWIVuOW1Y=
github.com/aaronland/go-artisanal-integers v0.1.1/go.mod h1:ZTeFI+Ck+q+Dp11Htld5aU6V+YwEzxzprsBO0t9GPp8=
github.com/aaronland/go-roster v0.0.1 h1:r1l4n1HfWvEtOXZvhfXX0Won9Xf6QJsigdUdzOtuy/M=
github.com/aaronland/go-roster v0.0.1/go.mod h1:AcovpxlG1XxJxX2Fjqlm63fEIBhCjEIBV4lP87FZDmI=
github.com/akrylysov/algnhsa v0.0.0-20190319020909-05b3d192e9a7/go.mod h1:HhzjNA0EjUWcwHTUMwqrpeAdIF3gRmpH0HpWx1hYJSc=
github.com/aws/aws-lambda-go v1.9.0/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A=
github.com/aws/aws-lambda-go v1.10.0 h1:uafgdfYGQD0UeT7d2uKdyWW8j/ZYRifRPIdmeqLzLCk=
Expand All @@ -14,6 +18,8 @@ github.com/tidwall/gjson v1.2.1 h1:j0efZLrZUvNerEf6xqoi0NjWMK5YlLrR7Guo/dxY174=
github.com/tidwall/gjson v1.2.1/go.mod h1:c/nTNbUr0E0OrXEhq1pwa8iEgc2DOt4ZZqAt1HtCkPA=
github.com/tidwall/gjson v1.3.5 h1:2oW9FBNu8qt9jy5URgrzsVx/T/KSn3qn/smJQ0crlDQ=
github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
github.com/tidwall/gjson v1.5.0 h1:QCssIUI7J0RStkzIcI4A7O6P8rDA5wi5IPf70uqKSxg=
github.com/tidwall/gjson v1.5.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
github.com/tidwall/pretty v0.0.0-20190325153808-1166b9ac2b65 h1:rQ229MBgvW68s1/g6f1/63TgYwYxfF4E+bi/KC19P8g=
Expand Down
2 changes: 2 additions & 0 deletions vendor/github.com/aaronland/go-artisanal-integers/go.mod

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

2 changes: 2 additions & 0 deletions vendor/github.com/aaronland/go-artisanal-integers/go.sum

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

55 changes: 55 additions & 0 deletions vendor/github.com/aaronland/go-artisanal-integers/integer.go

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

1 change: 1 addition & 0 deletions vendor/github.com/aaronland/go-roster/.gitignore

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

27 changes: 27 additions & 0 deletions vendor/github.com/aaronland/go-roster/LICENSE

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

2 changes: 2 additions & 0 deletions vendor/github.com/aaronland/go-roster/README.md

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

92 changes: 92 additions & 0 deletions vendor/github.com/aaronland/go-roster/default.go

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

3 changes: 3 additions & 0 deletions vendor/github.com/aaronland/go-roster/go.mod

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

13 changes: 13 additions & 0 deletions vendor/github.com/aaronland/go-roster/roster.go

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

6 changes: 5 additions & 1 deletion vendor/github.com/tidwall/gjson/README.md

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

6 changes: 5 additions & 1 deletion vendor/github.com/tidwall/gjson/SYNTAX.md

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

Loading

0 comments on commit 3544de0

Please sign in to comment.