Skip to content

Commit

Permalink
add go mod for pulsar-client-go (apache#4)
Browse files Browse the repository at this point in the history
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
  • Loading branch information
wolfstudy authored and merlimat committed May 15, 2019
1 parent b7700c0 commit b4c60c0
Show file tree
Hide file tree
Showing 23 changed files with 87 additions and 34 deletions.
18 changes: 18 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module github.com/apache/pulsar-client-go

go 1.12

require (
github.com/beefsack/go-rate v0.0.0-20180408011153-efa7637bb9b6
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b
github.com/golang/protobuf v1.3.1
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/pierrec/lz4 v2.0.5+incompatible
github.com/pkg/errors v0.8.1
github.com/sirupsen/logrus v1.4.1
github.com/spaolacci/murmur3 v1.1.0
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3 // indirect
github.com/stretchr/testify v1.3.0
github.com/valyala/gozstd v1.4.1
)
36 changes: 36 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
github.com/beefsack/go-rate v0.0.0-20180408011153-efa7637bb9b6 h1:KXlsf+qt/X5ttPGEjR0tPH1xaWWoKBEg9Q1THAj2h3I=
github.com/beefsack/go-rate v0.0.0-20180408011153-efa7637bb9b6/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA=
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b h1:AP/Y7sqYicnjGDfD5VcY4CIfh1hRXBUavxrvELjTiOE=
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
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/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
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/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/valyala/gozstd v1.4.1 h1:3/+pPStlV5Py2TsGhzNUItnYgX2yaX2tHMw/32c/0dM=
github.com/valyala/gozstd v1.4.1/go.mod h1:oYOS+oJovjw9ewtrwEYb9+ybolEXd6pHyLMuAWN5zts=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
2 changes: 1 addition & 1 deletion perf/perf-consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package main
import (
"context"
"encoding/json"
"pulsar-client-go/pulsar"
"github.com/apache/pulsar-client-go/pulsar"
"github.com/spf13/cobra"
log "github.com/sirupsen/logrus"
"sync/atomic"
Expand Down
3 changes: 2 additions & 1 deletion perf/perf-producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ package main
import (
"context"
"encoding/json"
`github.com/Anankke/bilibili-backup/library/net/http/blademaster/middleware/rate`
"github.com/beefsack/go-rate"
"github.com/bmizerany/perks/quantile"
"github.com/spf13/cobra"
log "github.com/sirupsen/logrus"
"pulsar-client-go/pulsar"
"github.com/apache/pulsar-client-go/pulsar"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion pulsar/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package pulsar

import (
"pulsar-client-go/pulsar/internal/auth"
"github.com/apache/pulsar-client-go/pulsar/internal/auth"
"time"
)

Expand Down
6 changes: 3 additions & 3 deletions pulsar/impl_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"net/url"
"pulsar-client-go/pulsar/internal"
"pulsar-client-go/pulsar/internal/auth"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
"github.com/apache/pulsar-client-go/pulsar/internal"
"github.com/apache/pulsar-client-go/pulsar/internal/auth"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
)

type client struct {
Expand Down
2 changes: 1 addition & 1 deletion pulsar/impl_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package pulsar

import (
"github.com/golang/protobuf/proto"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
)

type messageId struct {
Expand Down
6 changes: 3 additions & 3 deletions pulsar/impl_partition_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"context"
"github.com/golang/protobuf/proto"
log "github.com/sirupsen/logrus"
"pulsar-client-go/pulsar/internal"
"pulsar-client-go/pulsar/internal/util"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
"github.com/apache/pulsar-client-go/pulsar/internal"
"github.com/apache/pulsar-client-go/pulsar/internal/util"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
"sync"
"sync/atomic"
"time"
Expand Down
2 changes: 1 addition & 1 deletion pulsar/impl_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package pulsar

import (
"context"
"pulsar-client-go/pulsar/internal"
"github.com/apache/pulsar-client-go/pulsar/internal"
)

type producer struct {
Expand Down
3 changes: 1 addition & 2 deletions pulsar/internal/auth/disabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ package auth

import "crypto/tls"

type disabled struct {
}
type disabled struct {}

func NewAuthDisabled() Provider {
return &disabled{}
Expand Down
9 changes: 5 additions & 4 deletions pulsar/internal/auth/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
package auth

import (
"crypto/tls"
"fmt"
"github.com/pkg/errors"
"io"
"crypto/tls"
"fmt"
"io"

"github.com/pkg/errors"
)

type Provider interface {
Expand Down
4 changes: 2 additions & 2 deletions pulsar/internal/batch_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ package internal
import (
"github.com/golang/protobuf/proto"
log "github.com/sirupsen/logrus"
"pulsar-client-go/pulsar/internal/compression"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
"github.com/apache/pulsar-client-go/pulsar/internal/compression"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
"time"
)

Expand Down
3 changes: 2 additions & 1 deletion pulsar/internal/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ package internal

import (
"github.com/golang/protobuf/proto"

pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
log "github.com/sirupsen/logrus"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
)

const MaxFrameSize = 5 * 1024 * 1024
Expand Down
3 changes: 1 addition & 2 deletions pulsar/internal/compression/noop.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

package compression

type noopProvider struct {
}
type noopProvider struct {}

func NewNoopProvider() Provider {
return &noopProvider{}
Expand Down
3 changes: 1 addition & 2 deletions pulsar/internal/compression/zlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import (
"compress/zlib"
)

type zlibProvider struct {
}
type zlibProvider struct {}

func NewZLibProvider() Provider {
return &zlibProvider{}
Expand Down
3 changes: 1 addition & 2 deletions pulsar/internal/compression/zstd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import (
zstd "github.com/valyala/gozstd"
)

type zstdProvider struct {
}
type zstdProvider struct {}

func NewZStdProvider() Provider {
return &zstdProvider{}
Expand Down
4 changes: 2 additions & 2 deletions pulsar/internal/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"io/ioutil"
"net"
"net/url"
"pulsar-client-go/pulsar/internal/auth"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
"github.com/apache/pulsar-client-go/pulsar/internal/auth"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
"sync"
"sync/atomic"
"time"
Expand Down
2 changes: 1 addition & 1 deletion pulsar/internal/connection_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package internal
import (
log "github.com/sirupsen/logrus"
"net/url"
"pulsar-client-go/pulsar/internal/auth"
"github.com/apache/pulsar-client-go/pulsar/internal/auth"
"sync"
)

Expand Down
2 changes: 1 addition & 1 deletion pulsar/internal/connection_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/pkg/errors"
"io"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
)

type connectionReader struct {
Expand Down
2 changes: 1 addition & 1 deletion pulsar/internal/lookup_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/golang/protobuf/proto"
log "github.com/sirupsen/logrus"
"net/url"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
)

type LookupResult struct {
Expand Down
2 changes: 1 addition & 1 deletion pulsar/internal/lookup_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/assert"
"net/url"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion pulsar/internal/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package internal
import (
"github.com/golang/protobuf/proto"
"net/url"
pb "pulsar-client-go/pulsar/internal/pulsar_proto"
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
"sync"
"sync/atomic"
)
Expand Down
2 changes: 1 addition & 1 deletion pulsar/producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"context"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"pulsar-client-go/pulsar/internal/util"
"github.com/apache/pulsar-client-go/pulsar/internal/util"
"sync"
"testing"
"time"
Expand Down

0 comments on commit b4c60c0

Please sign in to comment.