1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

rename to protorpc and jsonrpc

This commit is contained in:
Asim 2015-11-28 18:54:38 +00:00
parent 80f53ab176
commit dddcdc34ed
9 changed files with 23 additions and 23 deletions

View File

@ -4,8 +4,8 @@ import (
"bytes"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/codec/json"
"github.com/micro/go-micro/codec/proto"
"github.com/micro/go-micro/codec/jsonrpc"
"github.com/micro/go-micro/codec/protorpc"
"github.com/micro/go-micro/transport"
rpc "github.com/youtube/vitess/go/rpcplus"
)
@ -27,11 +27,11 @@ var (
defaultContentType = "application/octet-stream"
defaultCodecs = map[string]codec.NewCodec{
"application/json": json.NewCodec,
"application/json-rpc": json.NewCodec,
"application/protobuf": proto.NewCodec,
"application/proto-rpc": proto.NewCodec,
"application/octet-stream": proto.NewCodec,
"application/json": jsonrpc.NewCodec,
"application/json-rpc": jsonrpc.NewCodec,
"application/protobuf": protorpc.NewCodec,
"application/proto-rpc": protorpc.NewCodec,
"application/octet-stream": protorpc.NewCodec,
}
)

View File

@ -1,4 +1,4 @@
package json
package jsonrpc
import (
"encoding/json"

View File

@ -1,4 +1,4 @@
package json
package jsonrpc
import (
"bytes"
@ -23,7 +23,7 @@ func (j *jsonCodec) Close() error {
}
func (j *jsonCodec) String() string {
return "json"
return "json-rpc"
}
func (j *jsonCodec) Write(m *codec.Message, b interface{}) error {

View File

@ -1,4 +1,4 @@
package json
package jsonrpc
import (
"encoding/json"

View File

@ -12,7 +12,7 @@ It has these top-level messages:
Request
Response
*/
package proto
package protorpc
import proto "github.com/golang/protobuf/proto"
import json "encoding/json"

View File

@ -1,4 +1,4 @@
package proto;
package protorpc;
message Request {
optional string service_method = 1;

View File

@ -1,4 +1,4 @@
package proto
package protorpc
import (
"encoding/binary"

View File

@ -1,4 +1,4 @@
package proto
package protorpc
import (
"bytes"
@ -27,7 +27,7 @@ func (c *protoCodec) Close() error {
}
func (c *protoCodec) String() string {
return "proto"
return "proto-rpc"
}
func (c *protoCodec) Write(m *codec.Message, b interface{}) error {

View File

@ -4,8 +4,8 @@ import (
"bytes"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/codec/json"
"github.com/micro/go-micro/codec/proto"
"github.com/micro/go-micro/codec/jsonrpc"
"github.com/micro/go-micro/codec/protorpc"
"github.com/micro/go-micro/transport"
rpc "github.com/youtube/vitess/go/rpcplus"
)
@ -25,11 +25,11 @@ type readWriteCloser struct {
var (
defaultCodecs = map[string]codec.NewCodec{
"application/json": json.NewCodec,
"application/json-rpc": json.NewCodec,
"application/protobuf": proto.NewCodec,
"application/proto-rpc": proto.NewCodec,
"application/octet-stream": proto.NewCodec,
"application/json": jsonrpc.NewCodec,
"application/json-rpc": jsonrpc.NewCodec,
"application/protobuf": protorpc.NewCodec,
"application/proto-rpc": protorpc.NewCodec,
"application/octet-stream": protorpc.NewCodec,
}
)