diff options
author | Valery Piashchynski <[email protected]> | 2021-09-08 20:55:25 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-09-08 20:55:25 +0300 |
commit | f855d878c281285bd8f468af0dba2521e4f211db (patch) | |
tree | 5d10640eb0f09718672819a30d39169589519e0d /plugins/grpc/codec.go | |
parent | b72643e64e116e51a245bc9331e25c3f73175030 (diff) |
Update protoc plugin,
Update serverOptions,
Update codec.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/grpc/codec.go')
-rw-r--r-- | plugins/grpc/codec.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/grpc/codec.go b/plugins/grpc/codec.go index dd299601..aeb373b9 100644 --- a/plugins/grpc/codec.go +++ b/plugins/grpc/codec.go @@ -4,6 +4,7 @@ import "google.golang.org/grpc/encoding" type rawMessage []byte +const cName string = "proto" const rm string = "rawMessage" func (r rawMessage) Reset() {} @@ -31,6 +32,10 @@ func (c *codec) Unmarshal(data []byte, v interface{}) error { return c.base.Unmarshal(data, v) } +func (c *codec) Name() string { + return cName +} + // String return codec name. func (c *codec) String() string { return "raw:" + c.base.Name() |