micro-server-grpc/response.go
Vasiliy Tolstov 7b5ce8c49a
Some checks failed
build / test (push) Failing after 9s
build / lint (push) Failing after 9s
codeql / analyze (go) (push) Failing after 10s
update to latest micro
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-09-17 12:52:41 +03:00

32 lines
507 B
Go

package grpc
import (
"io"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/server"
)
var _ server.Response = &rpcResponse{}
type rpcResponse struct {
rw io.ReadWriter
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
}