From 03fe6da3563b3ce7d922ac5c0629603723c445e5 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 31 Jul 2021 15:17:18 +0300 Subject: [PATCH] update all Signed-off-by: Vasiliy Tolstov --- broker/http/http_test.go | 389 ------------------------ broker/segmentio/broker_test.go | 161 +++++++++- go.mod | 14 +- go.sum | 35 +-- server/http/proto/test.pb.go | 100 +++--- server/http/proto/test.proto | 2 +- server/http/proto/test_micro.pb.go | 2 +- server/http/proto/test_micro_http.pb.go | 2 +- 8 files changed, 230 insertions(+), 475 deletions(-) delete mode 100644 broker/http/http_test.go diff --git a/broker/http/http_test.go b/broker/http/http_test.go deleted file mode 100644 index 356baee..0000000 --- a/broker/http/http_test.go +++ /dev/null @@ -1,389 +0,0 @@ -package http_test - -import ( - "context" - "sync" - "testing" - "time" - - "github.com/google/uuid" - http "github.com/unistack-org/micro-broker-http/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/register" -) - -var ( - // mock data - testData = map[string][]*register.Service{ - "foo": { - { - Name: "foo", - Version: "1.0.0", - Nodes: []*register.Node{ - { - ID: "foo-1.0.0-123", - Address: "localhost:9999", - }, - { - ID: "foo-1.0.0-321", - Address: "localhost:9999", - }, - }, - }, - { - Name: "foo", - Version: "1.0.1", - Nodes: []*register.Node{ - { - ID: "foo-1.0.1-321", - Address: "localhost:6666", - }, - }, - }, - { - Name: "foo", - Version: "1.0.3", - Nodes: []*register.Node{ - { - ID: "foo-1.0.3-345", - Address: "localhost:8888", - }, - }, - }, - }, - } -) - -func newTestRegister() register.Register { - return register.NewRegister() -} - -func sub(be *testing.B, c int) { - be.StopTimer() - m := newTestRegister() - - b := http.NewBroker(broker.Codec(jsoncodec.NewCodec()), broker.Register(m)) - topic := uuid.New().String() - - if err := b.Init(); err != nil { - be.Fatalf("Unexpected init error: %v", err) - } - - if err := b.Connect(context.TODO()); err != nil { - be.Fatalf("Unexpected connect error: %v", err) - } - - msg := &broker.Message{ - Header: map[string]string{ - "Content-Type": "application/json", - }, - Body: []byte(`{"message": "Hello World"}`), - } - - var subs []broker.Subscriber - done := make(chan bool, c) - - for i := 0; i < c; i++ { - sub, err := b.Subscribe(context.TODO(), topic, func(p broker.Event) error { - done <- true - m := p.Message() - - if string(m.Body) != string(msg.Body) { - be.Fatalf("Unexpected msg %s, expected %s", string(m.Body), string(msg.Body)) - } - - return nil - }, broker.SubscribeGroup("shared")) - if err != nil { - be.Fatalf("Unexpected subscribe error: %v", err) - } - subs = append(subs, sub) - } - - for i := 0; i < be.N; i++ { - be.StartTimer() - if err := b.Publish(context.TODO(), topic, msg); err != nil { - be.Fatalf("Unexpected publish error: %v", err) - } - <-done - be.StopTimer() - } - - for _, sub := range subs { - sub.Unsubscribe(context.TODO()) - } - - if err := b.Disconnect(context.TODO()); err != nil { - be.Fatalf("Unexpected disconnect error: %v", err) - } -} - -func pub(be *testing.B, c int) { - be.StopTimer() - m := newTestRegister() - b := http.NewBroker(broker.Codec(jsoncodec.NewCodec()), broker.Register(m)) - topic := uuid.New().String() - - if err := b.Init(); err != nil { - be.Fatalf("Unexpected init error: %v", err) - } - - if err := b.Connect(context.TODO()); err != nil { - be.Fatalf("Unexpected connect error: %v", err) - } - - msg := &broker.Message{ - Header: map[string]string{ - "Content-Type": "application/json", - }, - Body: []byte(`{"message": "Hello World"}`), - } - - done := make(chan bool, c*4) - - sub, err := b.Subscribe(context.TODO(), topic, func(p broker.Event) error { - done <- true - m := p.Message() - if string(m.Body) != string(msg.Body) { - be.Fatalf("Unexpected msg %s, expected %s", string(m.Body), string(msg.Body)) - } - return nil - }, broker.SubscribeGroup("shared")) - if err != nil { - be.Fatalf("Unexpected subscribe error: %v", err) - } - - var wg sync.WaitGroup - ch := make(chan int, c*4) - be.StartTimer() - - for i := 0; i < c; i++ { - go func() { - for range ch { - if err := b.Publish(context.TODO(), topic, msg); err != nil { - be.Fatalf("Unexpected publish error: %v", err) - } - select { - case <-done: - case <-time.After(time.Second): - } - wg.Done() - } - }() - } - - for i := 0; i < be.N; i++ { - wg.Add(1) - ch <- i - } - - wg.Wait() - be.StopTimer() - sub.Unsubscribe(context.TODO()) - close(ch) - close(done) - - if err := b.Disconnect(context.TODO()); err != nil { - be.Fatalf("Unexpected disconnect error: %v", err) - } -} - -func TestBroker(t *testing.T) { - m := newTestRegister() - b := http.NewBroker(broker.Codec(jsoncodec.NewCodec()), broker.Register(m)) - - if err := b.Init(); err != nil { - t.Fatalf("Unexpected init error: %v", err) - } - - if err := b.Connect(context.TODO()); err != nil { - t.Fatalf("Unexpected connect error: %v", err) - } - - msg := &broker.Message{ - Header: map[string]string{ - "Content-Type": "application/json", - }, - Body: []byte(`{"message":"Hello World"}`), - } - - done := make(chan struct{}) - - sub, err := b.Subscribe(context.TODO(), "test", func(p broker.Event) error { - m := p.Message() - - if string(m.Body) != string(msg.Body) { - t.Errorf("Unexpected msg %s, expected %s", string(m.Body), string(msg.Body)) - } - - close(done) - return nil - }) - if err != nil { - t.Fatalf("Unexpected subscribe error: %v", err) - } - - if err := b.Publish(context.TODO(), "test", msg); err != nil { - t.Fatalf("Unexpected publish error: %v", err) - } - - <-done - if err != nil { - t.Error(err) - } - sub.Unsubscribe(context.TODO()) - - if err := b.Disconnect(context.TODO()); err != nil { - t.Fatalf("Unexpected disconnect error: %v", err) - } -} - -func TestConcurrentSubBroker(t *testing.T) { - m := newTestRegister() - b := http.NewBroker(broker.Codec(jsoncodec.NewCodec()), broker.Register(m)) - - if err := b.Init(); err != nil { - t.Fatalf("Unexpected init error: %v", err) - } - - if err := b.Connect(context.TODO()); err != nil { - t.Fatalf("Unexpected connect error: %v", err) - } - - msg := &broker.Message{ - Header: map[string]string{ - "Content-Type": "application/json", - }, - Body: []byte(`{"message":"Hello World"}`), - } - - var subs []broker.Subscriber - var wg sync.WaitGroup - - for i := 0; i < 10; i++ { - sub, err := b.Subscribe(context.TODO(), "test", func(p broker.Event) error { - defer wg.Done() - - m := p.Message() - - if string(m.Body) != string(msg.Body) { - t.Errorf("Unexpected msg %s, expected %s", string(m.Body), string(msg.Body)) - } - - return nil - }) - if err != nil { - t.Fatalf("Unexpected subscribe error: %v", err) - } - - wg.Add(1) - subs = append(subs, sub) - } - - if err := b.Publish(context.TODO(), "test", msg); err != nil { - t.Fatalf("Unexpected publish error: %v", err) - } - - wg.Wait() - - for _, sub := range subs { - sub.Unsubscribe(context.TODO()) - } - - if err := b.Disconnect(context.TODO()); err != nil { - t.Fatalf("Unexpected disconnect error: %v", err) - } -} - -func TestConcurrentPubBroker(t *testing.T) { - m := newTestRegister() - b := http.NewBroker(broker.Codec(jsoncodec.NewCodec()), broker.Register(m)) - - if err := b.Init(); err != nil { - t.Fatalf("Unexpected init error: %v", err) - } - - if err := b.Connect(context.TODO()); err != nil { - t.Fatalf("Unexpected connect error: %v", err) - } - - msg := &broker.Message{ - Header: map[string]string{ - "Content-Type": "application/json", - }, - Body: []byte(`{"message":"Hello World"}`), - } - - var wg sync.WaitGroup - - sub, err := b.Subscribe(context.TODO(), "test", func(p broker.Event) error { - defer wg.Done() - - m := p.Message() - - if string(m.Body) != string(msg.Body) { - t.Fatalf("Unexpected msg %s, expected %s", string(m.Body), string(msg.Body)) - } - - return nil - }) - if err != nil { - t.Fatalf("Unexpected subscribe error: %v", err) - } - - for i := 0; i < 10; i++ { - wg.Add(1) - - if err := b.Publish(context.TODO(), "test", msg); err != nil { - t.Fatalf("Unexpected publish error: %v", err) - } - } - - wg.Wait() - - sub.Unsubscribe(context.TODO()) - - if err := b.Disconnect(context.TODO()); err != nil { - t.Fatalf("Unexpected disconnect error: %v", err) - } -} - -func BenchmarkSub1(b *testing.B) { - sub(b, 1) -} -func BenchmarkSub8(b *testing.B) { - sub(b, 8) -} - -func BenchmarkSub32(b *testing.B) { - sub(b, 32) -} - -func BenchmarkSub64(b *testing.B) { - sub(b, 64) -} - -func BenchmarkSub128(b *testing.B) { - sub(b, 128) -} - -func BenchmarkPub1(b *testing.B) { - pub(b, 1) -} - -func BenchmarkPub8(b *testing.B) { - pub(b, 8) -} - -func BenchmarkPub32(b *testing.B) { - pub(b, 32) -} - -func BenchmarkPub64(b *testing.B) { - pub(b, 64) -} - -func BenchmarkPub128(b *testing.B) { - pub(b, 128) -} diff --git a/broker/segmentio/broker_test.go b/broker/segmentio/broker_test.go index 8406cf7..0092c88 100644 --- a/broker/segmentio/broker_test.go +++ b/broker/segmentio/broker_test.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "io" + "log" "net/http" "os" "strings" @@ -36,6 +37,157 @@ var ( } ) +func TestConsumerGroup(t *testing.T) { + topic := fmt.Sprintf("test_topic") + if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 { + t.Skip() + } + + logger.DefaultLogger.Init(logger.WithLevel(logger.TraceLevel)) + ctx := context.Background() + + var addrs []string + if addr := os.Getenv("BROKER_ADDRS"); len(addr) == 0 { + addrs = []string{"127.0.0.1:9092"} + } else { + addrs = strings.Split(addr, ",") + } + + meter.DefaultMeter = victoriameter.NewMeter() + + s := https.NewServer(server.Context(ctx), server.Address("127.0.0.1:0"), server.Codec("text/plain", codec.NewCodec())) + if err := s.Init(); err != nil { + t.Fatal(err) + } + if err := meterhandler.RegisterMeterServer(s, meterhandler.NewHandler()); err != nil { + t.Fatal(err) + } + + if err := s.Start(); err != nil { + t.Fatal(err) + } + defer func() { + if err := s.Stop(); err != nil { + t.Fatal(err) + } + }() + + segmentio.DefaultWriterConfig.Async = true + segmentio.DefaultWriterConfig.BatchTimeout = 1 * time.Second + segmentio.DefaultWriterConfig.RequiredAcks = int(kafka.RequireAll) + segmentio.DefaultReaderConfig.StartOffset = kafka.FirstOffset + segmentio.DefaultReaderConfig.MinBytes = 1024 * 10 // 10 kb + segmentio.DefaultReaderConfig.MaxBytes = 1024 * 1024 * 20 // 20 Mb + segmentio.DefaultReaderConfig.MaxWait = 20 * time.Second // 20s + segmentio.DefaultReaderConfig.QueueCapacity = 500 + segmentio.DefaultReaderConfig.ReadBackoffMin = 2 * time.Second + segmentio.DefaultReaderConfig.ReadBackoffMax = 5 * time.Second + segmentio.DefaultReaderConfig.Logger = &lg{} + segmentio.DefaultReaderConfig.CommitInterval = 1 * time.Second + brk := segmentio.NewBroker(broker.Context(ctx), broker.Addrs(addrs...), segmentio.StatsInterval(5*time.Second), + segmentio.ClientID("test_sub"), + ) + t.Logf("init") + if err := brk.Init(); err != nil { + t.Fatal(err) + } + + t.Logf("connect") + if err := brk.Connect(ctx); err != nil { + t.Fatal(err) + } + + defer func() { + t.Logf("disconnect") + if err := brk.Disconnect(ctx); err != nil { + t.Fatal(err) + } + }() + + fmt.Printf("prefill topic\n") + go func() { + for i := 0; i < 900000; i++ { + if err := brk.Publish(ctx, topic, bm); err != nil { + t.Fatal(err) + } + //log.Printf("publish %d", i) + time.Sleep(200 * time.Millisecond) + } + }() + fmt.Printf("prefill complete\n") + + var cnt uint64 + var wait atomic.Value + wait.Store(true) + + fn := func(msg broker.Event) error { + if wait.Load().(bool) { + wait.Store(false) + } + atomic.AddUint64(&cnt, 1) + return msg.Ack() + } + + sub1, err := brk.Subscribe(ctx, topic, fn, broker.SubscribeGroup("test"), broker.SubscribeBodyOnly(true), broker.SubscribeAutoAck(true)) + if err != nil { + t.Fatal(err) + } + + sub2, err := brk.Subscribe(ctx, topic, fn, broker.SubscribeGroup("test"), broker.SubscribeBodyOnly(true), broker.SubscribeAutoAck(true)) + if err != nil { + t.Fatal(err) + } + + fmt.Printf("wait for ready\n") + for { + if !wait.Load().(bool) { + break + } + time.Sleep(1 * time.Second) + } + + time.Sleep(5 * time.Second) + fmt.Printf("unsub\n") + if err := sub1.Unsubscribe(ctx); err != nil { + t.Fatal(err) + } + time.Sleep(9 * time.Second) + sub1, err = brk.Subscribe(ctx, topic, fn, broker.SubscribeGroup("test"), broker.SubscribeBodyOnly(true), broker.SubscribeAutoAck(true)) + if err != nil { + t.Fatal(err) + } + + t1 := time.NewTicker(10 * time.Second) + defer t1.Stop() + t2 := time.NewTicker(30 * time.Second) + defer t2.Stop() + + for { + select { + case <-t1.C: + fmt.Printf("unsub from sub2\n") + if err := sub2.Unsubscribe(ctx); err != nil { + t.Fatal(err) + } + fmt.Printf("sub1\n") + sub1, err = brk.Subscribe(ctx, topic, fn, broker.SubscribeGroup("test"), broker.SubscribeBodyOnly(true), broker.SubscribeAutoAck(true)) + if err != nil { + t.Fatal(err) + } + case <-t2.C: + fmt.Printf("unsub from sub1\n") + if err := sub1.Unsubscribe(ctx); err != nil { + t.Fatal(err) + } + fmt.Printf("sub2\n") + sub2, err = brk.Subscribe(ctx, topic, fn, broker.SubscribeGroup("test"), broker.SubscribeBodyOnly(true), broker.SubscribeAutoAck(true)) + if err != nil { + t.Fatal(err) + } + } + } +} + func TestSub(t *testing.T) { topic := fmt.Sprintf("test_topic") if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 { @@ -106,8 +258,11 @@ func TestSub(t *testing.T) { fmt.Printf("prefill topic\n") go func() { for i := 0; i < 900000; i++ { - // brk.Publish(ctx, topic, bm) - time.Sleep(1 * time.Second) + if err := brk.Publish(ctx, topic, bm); err != nil { + t.Fatal(err) + } + log.Printf("publish %d", i) + // time.Sleep(1 * time.Second) } }() fmt.Printf("prefill complete\n") @@ -200,7 +355,7 @@ func BenchmarkPub(b *testing.B) { } }() - segmentio.DefaultWriterConfig.Async = true + segmentio.DefaultWriterConfig.Async = false segmentio.DefaultWriterConfig.BatchTimeout = 1 * time.Second segmentio.DefaultWriterConfig.RequiredAcks = int(kafka.RequireAll) fn := func(msgs []kafka.Message, err error) { diff --git a/go.mod b/go.mod index b05ce62..3e6bb2e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/unistack-org/micro-tests go 1.16 require ( - github.com/google/uuid v1.3.0 github.com/opentracing/opentracing-go v1.2.0 github.com/prometheus/client_golang v1.10.0 github.com/prometheus/client_model v0.2.0 @@ -12,11 +11,10 @@ require ( github.com/unistack-org/micro-api-handler-rpc/v3 v3.3.0 github.com/unistack-org/micro-api-router-register/v3 v3.2.2 github.com/unistack-org/micro-api-router-static/v3 v3.2.1 - github.com/unistack-org/micro-broker-http/v3 v3.3.1 github.com/unistack-org/micro-broker-segmentio/v3 v3.4.1 //github.com/unistack-org/micro-client-drpc/v3 v3.0.0-00010101000000-000000000000 - github.com/unistack-org/micro-client-grpc/v3 v3.3.3 - github.com/unistack-org/micro-client-http/v3 v3.4.5 + github.com/unistack-org/micro-client-grpc/v3 v3.4.0 + github.com/unistack-org/micro-client-http/v3 v3.4.8 github.com/unistack-org/micro-codec-grpc/v3 v3.2.1 github.com/unistack-org/micro-codec-json/v3 v3.2.1 github.com/unistack-org/micro-codec-jsonpb/v3 v3.2.2 @@ -26,7 +24,7 @@ require ( github.com/unistack-org/micro-codec-xml/v3 v3.2.2 github.com/unistack-org/micro-config-env/v3 v3.4.0 github.com/unistack-org/micro-config-vault/v3 v3.4.0 - github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.2 + github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.3 github.com/unistack-org/micro-metrics-prometheus/v3 v3.1.1 github.com/unistack-org/micro-proto v0.0.2 github.com/unistack-org/micro-router-register/v3 v3.2.2 @@ -34,10 +32,8 @@ require ( github.com/unistack-org/micro-server-http/v3 v3.4.1 github.com/unistack-org/micro-server-tcp/v3 v3.3.2 github.com/unistack-org/micro-wrapper-trace-opentracing/v3 v3.2.0 - github.com/unistack-org/micro/v3 v3.4.11 - golang.org/x/net v0.0.0-20210716203947-853a461950ff // indirect - golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect - google.golang.org/genproto v0.0.0-20210719143636-1d5a45f8e492 + github.com/unistack-org/micro/v3 v3.5.6 + google.golang.org/genproto v0.0.0-20210729151513-df9385d47c1b google.golang.org/grpc v1.39.0 google.golang.org/protobuf v1.27.1 storj.io/drpc v0.0.24 diff --git a/go.sum b/go.sum index 38dd018..cc0cd60 100644 --- a/go.sum +++ b/go.sum @@ -180,6 +180,7 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -565,14 +566,10 @@ github.com/unistack-org/micro-api-router-register/v3 v3.2.2 h1:O8tIP+NFqyp/3F8vY github.com/unistack-org/micro-api-router-register/v3 v3.2.2/go.mod h1:MZeqvmekQB/avrTRajp86+s7GuHkQ8HAee+hZtY+dWw= github.com/unistack-org/micro-api-router-static/v3 v3.2.1 h1:FMcEb8NYYX72OyQuMKHbtdEQV+eOFbmKyvwSY8cgan8= github.com/unistack-org/micro-api-router-static/v3 v3.2.1/go.mod h1:vP8VMZrJtlimEQOgYnLJsjnaUMeULNMPBkHEK5DA7G0= -github.com/unistack-org/micro-broker-http/v3 v3.3.1 h1:gs7TVth+rd2yOnikxstRlMIqSYas1yyxQAp9sJrhuMY= -github.com/unistack-org/micro-broker-http/v3 v3.3.1/go.mod h1:jO77nTg/qTwT+JVQQdFENa3LzQ8sLNU1dp3sUElgog0= -github.com/unistack-org/micro-broker-segmentio/v3 v3.4.1 h1:BH6iSZ7ztAJ2R0JXVMN7/Tlj2It13daAr1hG+/GKJrw= -github.com/unistack-org/micro-broker-segmentio/v3 v3.4.1/go.mod h1:QbDL0VZLw/g+63Memwq23U8R+26QVZO7H8OuSjbK0sk= -github.com/unistack-org/micro-client-grpc/v3 v3.3.3 h1:zKhxh45A4SP1b002fiFLK+vayL/YkHOpoCyZCRBmbm4= -github.com/unistack-org/micro-client-grpc/v3 v3.3.3/go.mod h1:96DSXqLd5kSiep2brs+h7WvsZG+z3C2KO/NDaYA1Czk= -github.com/unistack-org/micro-client-http/v3 v3.4.5 h1:nvLIMW1Bdh6R1JVSOS40Hyr6nVuHSt0yPTmA3QxKuMM= -github.com/unistack-org/micro-client-http/v3 v3.4.5/go.mod h1:Za26nIkbeBC12HIB5fUY1ixNbohUwqC/2nsrKJERxf8= +github.com/unistack-org/micro-client-grpc/v3 v3.4.0 h1:53BD9KpD8zhKa+wz8gHnzxRkpnME6elbb6cj2NCRDtM= +github.com/unistack-org/micro-client-grpc/v3 v3.4.0/go.mod h1:GHDcF7/N3Oidw03u9nhju5iuxHI7pGBIxlaDABqufvA= +github.com/unistack-org/micro-client-http/v3 v3.4.8 h1:Wc8twac/nuXL7DW1RygUFhdGKo9w78b9qjk1hl1a8Kk= +github.com/unistack-org/micro-client-http/v3 v3.4.8/go.mod h1:7BwMcYaW5/FGRZalZ/AeEksvRVTDg7rn+fOjRrHUNLE= github.com/unistack-org/micro-codec-grpc/v3 v3.2.1 h1:C+9DHTtRSvodlVOFo0+zMhBXoIye/hMleXlRv0o1yIU= github.com/unistack-org/micro-codec-grpc/v3 v3.2.1/go.mod h1:kaEdCPyWsa4o44cD4oS0+KzJWtshlXocZgnzEY+LZHQ= github.com/unistack-org/micro-codec-json/v3 v3.2.1 h1:nMRBnEvCttwX4yPAWuRSAvzcfLazRetqO4DpqJJHjY8= @@ -591,8 +588,8 @@ github.com/unistack-org/micro-config-env/v3 v3.4.0 h1:/BtRPJGIwlMAqrTeV/g6VScbR3 github.com/unistack-org/micro-config-env/v3 v3.4.0/go.mod h1:y04HnaG9e2AEEA/HCZdCOmsISNUoQBz8FslzUwMHI0Q= github.com/unistack-org/micro-config-vault/v3 v3.4.0 h1:CON62FrGEmLZD/FIkyAQttdL09NYiH9HnWmg9x/iEnQ= github.com/unistack-org/micro-config-vault/v3 v3.4.0/go.mod h1:wFOlWwaMw/sJStlUAtN6S94aZEZOOsWmFpFv97/EYik= -github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.2 h1:qIC/oH/Pi2Bke7F3TkU5JrVLMkoZnMNv5RE/T3HGff8= -github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.2/go.mod h1:cDz4YigqJ3e3/2A8ze5SdJA8Z7KJf/s0VlIA6w97EHw= +github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.3 h1:eKe0IjMm5e02rkhALo1FcG6UxYKOsJ5HU1loGKAUyPs= +github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.3/go.mod h1:cDz4YigqJ3e3/2A8ze5SdJA8Z7KJf/s0VlIA6w97EHw= github.com/unistack-org/micro-metrics-prometheus/v3 v3.1.1 h1:AZVQ8l1p1pIUyImQo/if/5t1g9C9du9ulMRqATSmgGo= github.com/unistack-org/micro-metrics-prometheus/v3 v3.1.1/go.mod h1:QfquVeYZ2+BqBQ5bv1+uFAeWFiacvwanRDy3nGVqo3c= github.com/unistack-org/micro-proto v0.0.2 h1:mL1ZPRGPCWJOiMBiJrkk8Y513rPrJmhJWxyLceckAXU= @@ -612,15 +609,14 @@ github.com/unistack-org/micro/v3 v3.2.1/go.mod h1:J8XxJj4Pqa3Ee0a4biRRtut7UwTlfB github.com/unistack-org/micro/v3 v3.2.2/go.mod h1:J8XxJj4Pqa3Ee0a4biRRtut7UwTlfBq8QRe+s4PKGS0= github.com/unistack-org/micro/v3 v3.2.11/go.mod h1:uGPB8BhDWHj63tR3eaoCd3X+lPtAgFG630897yhB3Ag= github.com/unistack-org/micro/v3 v3.3.13/go.mod h1:98hNcMXp/WyWJwLwCuwrhN1Jm7aCWaRNsMfRjK8Fq+Y= -github.com/unistack-org/micro/v3 v3.3.16/go.mod h1:ETGcQQUcjxGaD44LUMX+0fgo8Loh7ExldfIPLvfUmDo= github.com/unistack-org/micro/v3 v3.3.17/go.mod h1:022EOEZZ789hZY3yB5ZSMXU6jLiadBgcNB/cpediV3c= github.com/unistack-org/micro/v3 v3.3.19/go.mod h1:LXmPfbJnJNvL0kQs8HfnkV3Wya2Wb+C7keVq++RCZnk= github.com/unistack-org/micro/v3 v3.4.0/go.mod h1:LXmPfbJnJNvL0kQs8HfnkV3Wya2Wb+C7keVq++RCZnk= github.com/unistack-org/micro/v3 v3.4.7/go.mod h1:LXmPfbJnJNvL0kQs8HfnkV3Wya2Wb+C7keVq++RCZnk= -github.com/unistack-org/micro/v3 v3.4.8/go.mod h1:LXmPfbJnJNvL0kQs8HfnkV3Wya2Wb+C7keVq++RCZnk= -github.com/unistack-org/micro/v3 v3.4.9/go.mod h1:1ZkwpEqpiHiVhM2hiF9DamtpsF04oFybFhEQ4zEMcro= -github.com/unistack-org/micro/v3 v3.4.11 h1:WIqUeRN+awVMzTFNeCPx67sSMP3YuXugLmO9qkn8e7g= github.com/unistack-org/micro/v3 v3.4.11/go.mod h1:1ZkwpEqpiHiVhM2hiF9DamtpsF04oFybFhEQ4zEMcro= +github.com/unistack-org/micro/v3 v3.5.4/go.mod h1:1ZkwpEqpiHiVhM2hiF9DamtpsF04oFybFhEQ4zEMcro= +github.com/unistack-org/micro/v3 v3.5.6 h1:0ZRWRkJVm5uyMZ2kMqsPudyv57pnGSj2VYHVeAt6cNk= +github.com/unistack-org/micro/v3 v3.5.6/go.mod h1:P8k8nuM0RYUdX6TNxO4yzq3tjtrvh11trhr79zWYeTM= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -732,12 +728,11 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210415231046-e915ea6b2b7d/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210716203947-853a461950ff h1:j2EK/QoxYNBsXI4R7fQkkRUk8y6wnOBI+6hgPdP/6Ds= -golang.org/x/net v0.0.0-20210716203947-853a461950ff/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 h1:4CSI6oo7cOjJKajidEljs9h+uP0rRZBPPPhcCbj5mw8= +golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -872,9 +867,8 @@ google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBr google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210719143636-1d5a45f8e492 h1:7yQQsvnwjfEahbNNEKcBHv3mR+HnB1ctGY/z1JXzx8M= -google.golang.org/genproto v0.0.0-20210719143636-1d5a45f8e492/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210729151513-df9385d47c1b h1:4xoALQmXxqVdDdLimpPyPeDdsJzo+nFTJw9euAMpqgM= +google.golang.org/genproto v0.0.0-20210729151513-df9385d47c1b/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -904,7 +898,6 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= diff --git a/server/http/proto/test.pb.go b/server/http/proto/test.pb.go index 205a9b5..be4d4dc 100644 --- a/server/http/proto/test.pb.go +++ b/server/http/proto/test.pb.go @@ -408,62 +408,62 @@ var file_test_proto_rawDesc = []byte{ 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x31, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x73, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x73, 0x70, 0x22, 0x19, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0x9f, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x44, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x75, + 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0xa4, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x44, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x12, 0x95, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, - 0x70, 0x22, 0x64, 0x92, 0x41, 0x34, 0x2a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x4a, 0x2c, 0x0a, 0x07, + 0x70, 0x22, 0x69, 0x92, 0x41, 0x34, 0x2a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x4a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, - 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, - 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0xba, - 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x32, 0x8c, 0x05, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, - 0x12, 0xb7, 0x01, 0x0a, 0x12, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, - 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x82, 0x01, 0x92, 0x41, 0x42, 0x2a, 0x12, 0x43, 0x61, 0x6c, - 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4a, - 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0f, 0x0a, 0x0d, - 0x1a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2f, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, - 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x73, 0x7d, 0x3a, - 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0xb2, 0x01, 0x0a, 0x11, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, - 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x7f, - 0x92, 0x41, 0x41, 0x2a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x4a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x12, 0x21, 0x0a, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, - 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, - 0x69, 0x64, 0x73, 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, - 0x84, 0x01, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, - 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x5e, 0x92, 0x41, 0x34, 0x2a, 0x04, 0x43, 0x61, 0x6c, - 0x6c, 0x4a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0f, - 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, - 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, - 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x8d, 0x01, 0x0a, 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, - 0x52, 0x65, 0x71, 0x31, 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, - 0x52, 0x73, 0x70, 0x31, 0x22, 0x60, 0x92, 0x41, 0x39, 0x2a, 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x4a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, + 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, + 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, + 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x32, 0x8c, 0x05, 0x0a, + 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0xb7, 0x01, 0x0a, 0x12, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x0d, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x82, 0x01, 0x92, 0x41, 0x42, + 0x2a, 0x12, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x4a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, - 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, - 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, + 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x64, 0x73, 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, + 0xb2, 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, + 0x52, 0x73, 0x70, 0x22, 0x7f, 0x92, 0x41, 0x41, 0x2a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x4a, 0x2c, 0x0a, 0x07, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22, + 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2f, 0x7b, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x69, 0x64, 0x73, 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, + 0x01, 0x02, 0x08, 0x05, 0x12, 0x84, 0x01, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0d, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x5e, 0x92, 0x41, 0x34, + 0x2a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x4a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x21, 0x0a, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x8d, 0x01, 0x0a, 0x09, + 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x31, 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x31, 0x22, 0x60, 0x92, 0x41, 0x39, 0x2a, 0x09, + 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x42, 0x3a, 0x5a, 0x38, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, + 0x74, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/server/http/proto/test.proto b/server/http/proto/test.proto index 9de827e..0a7ad98 100644 --- a/server/http/proto/test.proto +++ b/server/http/proto/test.proto @@ -26,7 +26,7 @@ service TestDouble { } } }; - option (micro.api.http) = { post: "/v1/testdouble/call/{name}"; body: "*"; }; + option (micro.api.http) = { post: "/v1/testdouble/call/name/{name}"; body: "*"; }; option (micro.api.micro_method) = { timeout: 5; }; }; }; diff --git a/server/http/proto/test_micro.pb.go b/server/http/proto/test_micro.pb.go index 1749658..a6e5ceb 100644 --- a/server/http/proto/test_micro.pb.go +++ b/server/http/proto/test_micro.pb.go @@ -16,7 +16,7 @@ var ( TestDoubleEndpoints = []api.Endpoint{ api.Endpoint{ Name: "TestDouble.CallDouble", - Path: []string{"/v1/testdouble/call/{name}"}, + Path: []string{"/v1/testdouble/call/name/{name}"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", diff --git a/server/http/proto/test_micro_http.pb.go b/server/http/proto/test_micro_http.pb.go index d095feb..3bf7bb7 100644 --- a/server/http/proto/test_micro_http.pb.go +++ b/server/http/proto/test_micro_http.pb.go @@ -31,7 +31,7 @@ func (c *testDoubleClient) CallDouble(ctx context.Context, req *CallReq, opts .. ) opts = append(opts, v3.Method(http.MethodPost), - v3.Path("/v1/testdouble/call/{name}"), + v3.Path("/v1/testdouble/call/name/{name}"), v3.Body("*"), ) opts = append(opts, client.WithRequestTimeout(time.Second*5))