From 3df6cd152d858522cbd6cabbcd04fc670260b869 Mon Sep 17 00:00:00 2001 From: Victor Almeida Date: Fri, 20 Aug 2021 16:32:15 -0300 Subject: [PATCH] Update to Pitaya 2.0.1 --- bot/pitaya_client.go | 8 +++++--- bot/sequential.go | 14 +++++++++++--- cmd/utils.go | 5 +++-- go.mod | 2 +- go.sum | 26 +++++++------------------- metrics/prometheus_reporter.go | 2 +- testing/json/main.go | 8 ++++---- testing/protobuffer/main.go | 12 ++++++------ 8 files changed, 38 insertions(+), 39 deletions(-) diff --git a/bot/pitaya_client.go b/bot/pitaya_client.go index 00b3d25..ec61260 100644 --- a/bot/pitaya_client.go +++ b/bot/pitaya_client.go @@ -8,8 +8,9 @@ import ( "time" "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/client" - pitayamessage "github.com/topfreegames/pitaya/conn/message" + "github.com/topfreegames/pitaya/v2/client" + pitayamessage "github.com/topfreegames/pitaya/v2/conn/message" + "github.com/topfreegames/pitaya/v2/session" ) // information for the singleton @@ -70,7 +71,7 @@ func tryConnect(pClient client.PitayaClient, addr string, useTLS bool, logger lo } // NewPClient is the PCLient constructor -func NewPClient(host string, useTLS bool, timeout time.Duration, logger logrus.FieldLogger, docs string, pushinfo map[string]string) (*PClient, error) { +func NewPClient(host string, useTLS bool, handshake *session.HandshakeData, timeout time.Duration, logger logrus.FieldLogger, docs string, pushinfo map[string]string) (*PClient, error) { var pclient client.PitayaClient if docs != "" { protoclient := client.NewProto(docs, logrus.InfoLevel) @@ -82,6 +83,7 @@ func NewPClient(host string, useTLS bool, timeout time.Duration, logger logrus.F pclient = client.New(logrus.InfoLevel) } + pclient.SetClientHandshakeData(handshake) if err := tryConnect(pclient, host, useTLS, logger); err != nil { logger.WithError(err).Error("Error connecting to server") return nil, err diff --git a/bot/sequential.go b/bot/sequential.go index 00e5ca0..c211272 100644 --- a/bot/sequential.go +++ b/bot/sequential.go @@ -1,6 +1,7 @@ package bot import ( + "encoding/json" "fmt" "github.com/sirupsen/logrus" @@ -10,6 +11,7 @@ import ( "github.com/topfreegames/pitaya-bot/metrics" "github.com/topfreegames/pitaya-bot/models" "github.com/topfreegames/pitaya-bot/storage" + "github.com/topfreegames/pitaya/v2/session" ) // SequentialBot defines the struct for the sequential bot that is going to run @@ -255,9 +257,15 @@ func (b *SequentialBot) Connect(hosts ...string) error { docs = b.config.GetString("server.protobuffer.docs") } - useTLS := b.config.GetBool("server.tls") - timeout := b.config.GetDuration("server.requestTimeout") - client, err := NewPClient(b.host, useTLS, timeout, b.logger, docs, pushinfo) + var handshake *session.HandshakeData + err := json.Unmarshal([]byte(b.config.GetString("server.handshake")), &handshake) + if err != nil { + b.logger.Fatal("Invalid handshake.") + } + + useTLS := b.config.GetBool("server.tls") + timeout := b.config.GetDuration("server.requestTimeout") + client, err := NewPClient(b.host, useTLS, handshake, timeout, b.logger, docs, pushinfo) if err != nil { b.logger.WithError(err).Error("Unable to create client...") return err diff --git a/cmd/utils.go b/cmd/utils.go index ddbd192..53bab9a 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -2,7 +2,8 @@ package cmd import ( "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/logger" + "github.com/topfreegames/pitaya/v2/logger" + pitayalogrus "github.com/topfreegames/pitaya/v2/logger/logrus" ) func getLogger() logrus.FieldLogger { @@ -29,6 +30,6 @@ func getLogger() logrus.FieldLogger { "app": "pitaya-bot", }) - logger.SetLogger(fieldLogger) + logger.SetLogger(pitayalogrus.NewWithEntry(fieldLogger)) return fieldLogger } diff --git a/go.mod b/go.mod index 71a4392..8962920 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/spf13/viper v1.1.0 github.com/stretchr/testify v1.3.0 github.com/topfreegames/extensions v8.2.2+incompatible - github.com/topfreegames/pitaya v1.1.5 + github.com/topfreegames/pitaya/v2 v2.0.1 golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 // indirect golang.org/x/time v0.0.0-20181108054448-85acf8d2951c // indirect google.golang.org/appengine v1.3.0 // indirect diff --git a/go.sum b/go.sum index b8b4f53..13c84df 100644 --- a/go.sum +++ b/go.sum @@ -56,7 +56,8 @@ github.com/golang/groupcache v0.0.0-20180203143532-66deaeb636df h1:Sf/EWTqecLGj5 github.com/golang/groupcache v0.0.0-20180203143532-66deaeb636df/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= @@ -81,7 +82,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.3.0 h1:HJtP6RRwj2EpPCD/mhAWzSvLL/dFTdP github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v0.0.0-20180320202055-f40e974e75af/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce h1:xdsDDbiBDQTKASoGEZ+pEmF1OnWuu8AQ9I8iNbHNeno= github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= @@ -103,14 +103,12 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN 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/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v0.0.0-20180715050151-f15292f7a699 h1:KXZJFdun9knAVAR8tg/aHJEr5DgtcbqyvzacK+CDCaI= github.com/mitchellh/mapstructure v0.0.0-20180715050151-f15292f7a699/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -119,7 +117,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLD github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/nats-io/gnatsd v1.4.1 h1:RconcfDeWpKCD6QIIwiVFcvForlXpWeJP7i5/lDLy44= github.com/nats-io/gnatsd v1.4.1/go.mod h1:nqco77VO78hLCJpIcVfygDP2rPGfsEHkGTUk94uh5DQ= -github.com/nats-io/go-nats v1.4.0/go.mod h1:+t7RHT5ApZebkrQdnn6AhQJmhJJiKAvJUio1PiiCtj0= github.com/nats-io/go-nats v1.5.0 h1:OrEQSvQQrP+A+9EBBxY86Z4Es6uaUdObZ5UhWHn9b08= github.com/nats-io/go-nats v1.5.0/go.mod h1:+t7RHT5ApZebkrQdnn6AhQJmhJJiKAvJUio1PiiCtj0= github.com/nats-io/jwt v0.2.14 h1:wA50KvFz/JXGXMHRygTWsRGh/ixxgC5E3kHvmtGLNf4= @@ -144,7 +141,6 @@ github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/orfjackal/nanospec.go v0.0.0-20120727230329-de4694c1d701 h1:yOXfzNV7qkZ3nf2NPqy4BMzlCmnQzIEbI1vuqKb2FkQ= github.com/orfjackal/nanospec.go v0.0.0-20120727230329-de4694c1d701/go.mod h1:VtBIF1XX0c1nKkeAPk8i4aXkYopqQgfDqolHUIHPwNI= -github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -155,21 +151,16 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180326160409-38c53a9f4bfc/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e h1:n/3MEhJQjQxrOUCzh1Y3Re6aJUUWRp2M9+Oc3eVn/54= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20180321230812-780932d4fbbe/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273 h1:agujYaXJSxSo18YNX3jzl+4G6Bstwt+kqv47GS12uL0= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spf13/afero v1.0.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.1.1 h1:Lt3ihYMlE+lreX1GS4Qw4ZsNpYQLxIXKBTEOXm3nt6I= github.com/spf13/afero v1.1.1/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.2.0 h1:HHl1DSRbEQN2i8tJmtS6ViPyHx35+p51amrdsiTCrkg= @@ -178,7 +169,6 @@ github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec h1:2ZXvIUGghLpdTVHR1UfvfrzoVlZaE/yOWC5LueIHZig= github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.2 h1:Fy0orTDgHdbnzHcsOgfCN4LtHf0ec3wwtiwJqwvf3Gc= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -186,9 +176,6 @@ github.com/spf13/viper v1.0.2/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7Sr github.com/spf13/viper v1.1.0 h1:V7OZpY8i3C1x/pDmU0zNNlfVoDz112fSYvtWMjjS3f4= github.com/spf13/viper v1.1.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -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/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc= @@ -197,10 +184,8 @@ github.com/topfreegames/extensions v8.2.2+incompatible h1:JTyOlttU88JB97Y1a5L82n github.com/topfreegames/extensions v8.2.2+incompatible/go.mod h1:VbIAks7aNbkANieZyVShAV3FSxEbV6useS4r3neXVzc= github.com/topfreegames/go-workers v1.0.0 h1:R53uIT6nwlT45WBm79ZDnxG8W2ec9lJk3uJhZUmd3GI= github.com/topfreegames/go-workers v1.0.0/go.mod h1:FZ45GKJrHNIChLw008zoR8lvoMTxK9RprdE2c3uLrCQ= -github.com/topfreegames/pitaya v0.15.4 h1:GsrdCZNTvDiC+zoBVwGVarfy6hbpjhwlU/3Qdftgkg8= -github.com/topfreegames/pitaya v0.15.4/go.mod h1:2UaEoglDroRu3YvM4tF5PMV2UCqVyh/UTVFc6biFCDk= -github.com/topfreegames/pitaya v1.1.5 h1:3tOE4o6WcdKFAVIKCv/zIGf+o9jw6E5pb6T+JJuot0w= -github.com/topfreegames/pitaya v1.1.5/go.mod h1:P/54Da/4k9FWy0LfkYtXWva8ddqojRbBKAONfNT8OXc= +github.com/topfreegames/pitaya/v2 v2.0.1 h1:g2PwX0ar4wnLOBFqOsgg1U9zfCgaslvu42oc9EtpWGk= +github.com/topfreegames/pitaya/v2 v2.0.1/go.mod h1:zKHeZ7dIiaZsWjp6faxuso+8+Vccc9M/kecdQPZTrM0= github.com/uber-go/atomic v1.3.2 h1:Azu9lPBWRNKzYXSIwRfgRuDuS0YKsK4NFhiQv98gkxo= github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= github.com/uber/jaeger-client-go v2.13.0+incompatible h1:BQ7GxyS54wK+5kfRNoMVOhgQ7VAjhYlFq4rAhV7pnHc= @@ -237,6 +222,7 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e h1:D5TXcfTk7xF7hvieo4QErS3qqCB4teTffacDWr7CI+0= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/time v0.0.0-20180314180208-26559e0f760e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -283,5 +269,7 @@ k8s.io/klog v0.1.0 h1:I5HMfc/DtuVaGR1KPwUrTc476K8NCqNBldC7H4dYEzk= k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be h1:aWEq4nbj7HRJ0mtKYjNSk/7X28Tl6TI6FeG8gKF+r7Q= k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/metrics/prometheus_reporter.go b/metrics/prometheus_reporter.go index 460772d..190d700 100644 --- a/metrics/prometheus_reporter.go +++ b/metrics/prometheus_reporter.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/client_golang/prometheus" pbConstants "github.com/topfreegames/pitaya-bot/constants" - "github.com/topfreegames/pitaya/constants" + "github.com/topfreegames/pitaya/v2/constants" ) var ( diff --git a/testing/json/main.go b/testing/json/main.go index 5692f2e..db49c05 100644 --- a/testing/json/main.go +++ b/testing/json/main.go @@ -30,10 +30,10 @@ import ( "github.com/google/uuid" "github.com/sirupsen/logrus" "github.com/spf13/viper" - "github.com/topfreegames/pitaya" - "github.com/topfreegames/pitaya/acceptor" - "github.com/topfreegames/pitaya/component" - "github.com/topfreegames/pitaya/serialize/json" + "github.com/topfreegames/pitaya/v2" + "github.com/topfreegames/pitaya/v2/acceptor" + "github.com/topfreegames/pitaya/v2/component" + "github.com/topfreegames/pitaya/v2/serialize/json" ) // PlayerHandler ... diff --git a/testing/protobuffer/main.go b/testing/protobuffer/main.go index a1cb109..63261dc 100644 --- a/testing/protobuffer/main.go +++ b/testing/protobuffer/main.go @@ -33,12 +33,12 @@ import ( "github.com/google/uuid" "github.com/sirupsen/logrus" "github.com/spf13/viper" - "github.com/topfreegames/pitaya" - "github.com/topfreegames/pitaya/acceptor" - "github.com/topfreegames/pitaya/component" - "github.com/topfreegames/pitaya/constants" - pitayaprotos "github.com/topfreegames/pitaya/protos" - "github.com/topfreegames/pitaya/serialize/protobuf" + "github.com/topfreegames/pitaya/v2" + "github.com/topfreegames/pitaya/v2/acceptor" + "github.com/topfreegames/pitaya/v2/component" + "github.com/topfreegames/pitaya/v2/constants" + pitayaprotos "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v2/serialize/protobuf" "github.com/topfreegames/pitaya-bot/testing/protobuffer/protos" )