ttrpc: rename project to ttrpc
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: github.com/stevvooe/mgrpc/example/example.proto
|
||||
// source: github.com/stevvooe/ttrpc/example/example.proto
|
||||
|
||||
/*
|
||||
Package example is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
github.com/stevvooe/mgrpc/example/example.proto
|
||||
github.com/stevvooe/ttrpc/example/example.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Method1Request
|
||||
@@ -23,7 +23,7 @@ import _ "github.com/gogo/protobuf/gogoproto"
|
||||
import _ "github.com/gogo/protobuf/types"
|
||||
|
||||
import context "context"
|
||||
import github_com_stevvooe_mgrpc "github.com/stevvooe/mgrpc"
|
||||
import github_com_stevvooe_ttrpc "github.com/stevvooe/ttrpc"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
@@ -68,9 +68,9 @@ func (*Method2Request) ProtoMessage() {}
|
||||
func (*Method2Request) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{2} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Method1Request)(nil), "mgrpc.example.v1.Method1Request")
|
||||
proto.RegisterType((*Method1Response)(nil), "mgrpc.example.v1.Method1Response")
|
||||
proto.RegisterType((*Method2Request)(nil), "mgrpc.example.v1.Method2Request")
|
||||
proto.RegisterType((*Method1Request)(nil), "ttrpc.example.v1.Method1Request")
|
||||
proto.RegisterType((*Method1Response)(nil), "ttrpc.example.v1.Method1Response")
|
||||
proto.RegisterType((*Method2Request)(nil), "ttrpc.example.v1.Method2Request")
|
||||
}
|
||||
func (m *Method1Request) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
@@ -189,23 +189,23 @@ type ExampleService interface {
|
||||
Method2(ctx context.Context, req *Method1Request) (*google_protobuf1.Empty, error)
|
||||
}
|
||||
|
||||
func RegisterExampleService(srv *github_com_stevvooe_mgrpc.Server, svc ExampleService) error {
|
||||
return srv.Register("mgrpc.example.v1.Example", map[string]github_com_stevvooe_mgrpc.Handler{
|
||||
"Method1": github_com_stevvooe_mgrpc.HandlerFunc(func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
func RegisterExampleService(srv *github_com_stevvooe_ttrpc.Server, svc ExampleService) error {
|
||||
return srv.Register("ttrpc.example.v1.Example", map[string]github_com_stevvooe_ttrpc.Handler{
|
||||
"Method1": github_com_stevvooe_ttrpc.HandlerFunc(func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return svc.Method1(ctx, req.(*Method1Request))
|
||||
}),
|
||||
"Method2": github_com_stevvooe_mgrpc.HandlerFunc(func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
"Method2": github_com_stevvooe_ttrpc.HandlerFunc(func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return svc.Method2(ctx, req.(*Method1Request))
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
type ExampleClient struct {
|
||||
client *github_com_stevvooe_mgrpc.Client
|
||||
client *github_com_stevvooe_ttrpc.Client
|
||||
}
|
||||
|
||||
func (c *ExampleClient) Method1(ctx context.Context, req *Method1Request) (*Method1Response, error) {
|
||||
resp, err := c.client.Call(ctx, "mgrpc.example.v1.Example", "Method1", req)
|
||||
resp, err := c.client.Call(ctx, "ttrpc.example.v1.Example", "Method1", req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -213,7 +213,7 @@ func (c *ExampleClient) Method1(ctx context.Context, req *Method1Request) (*Meth
|
||||
}
|
||||
|
||||
func (c *ExampleClient) Method2(ctx context.Context, req *Method1Request) (*google_protobuf1.Empty, error) {
|
||||
resp, err := c.client.Call(ctx, "mgrpc.example.v1.Example", "Method2", req)
|
||||
resp, err := c.client.Call(ctx, "ttrpc.example.v1.Example", "Method2", req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -711,7 +711,7 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("github.com/stevvooe/mgrpc/example/example.proto", fileDescriptorExample)
|
||||
proto.RegisterFile("github.com/stevvooe/ttrpc/example/example.proto", fileDescriptorExample)
|
||||
}
|
||||
|
||||
var fileDescriptorExample = []byte{
|
||||
|
||||
Reference in New Issue
Block a user