micro-server-grpc/response.go
Vasiliy Tolstov 129f02b3bc
Some checks failed
build / test (push) Failing after 1m33s
build / lint (push) Successful in 2m15s
codeql / analyze (go) (push) Failing after 3m38s
fixup lint and tests
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-12-11 01:29:39 +03:00

29 lines
478 B
Go

package grpc
import (
"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 {
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
}