All checks were successful
test / test (push) Successful in 1m53s
move to v4 micro Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org> Reviewed-on: #195 Co-authored-by: Evstigneev Denis <danteevstigneev@yandex.ru> Co-committed-by: Evstigneev Denis <danteevstigneev@yandex.ru>
29 lines
478 B
Go
29 lines
478 B
Go
package grpc
|
|
|
|
import (
|
|
"go.unistack.org/micro/v4/codec"
|
|
"go.unistack.org/micro/v4/metadata"
|
|
"go.unistack.org/micro/v4/server"
|
|
)
|
|
|
|
var _ server.Response = &rpcResponse{}
|
|
|
|
type rpcResponse struct {
|
|
header metadata.Metadata
|
|
codec codec.Codec
|
|
}
|
|
|
|
func (r *rpcResponse) Codec() codec.Codec {
|
|
return r.codec
|
|
}
|
|
|
|
func (r *rpcResponse) WriteHeader(hdr metadata.Metadata) {
|
|
for k, v := range hdr {
|
|
r.header[k] = v
|
|
}
|
|
}
|
|
|
|
func (r *rpcResponse) Write(b []byte) error {
|
|
return nil
|
|
}
|