micro-server-tcp/request.go
Vasiliy Tolstov 449cc08217 update codec interface
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-25 23:56:38 +03:00

52 lines
819 B
Go

package tcp
import (
"github.com/unistack-org/micro/v3/codec"
)
type tcpRequest struct {
service string
method string
endpoint string
contentType string
header map[string]string
body interface{}
codec codec.Codec
}
func (r *tcpRequest) Service() string {
return r.service
}
func (r *tcpRequest) Method() string {
return r.method
}
func (r *tcpRequest) Endpoint() string {
return r.endpoint
}
func (r *tcpRequest) ContentType() string {
return r.contentType
}
func (r *tcpRequest) Header() map[string]string {
return r.header
}
func (r *tcpRequest) Body() interface{} {
return r.body
}
func (r *tcpRequest) Read() ([]byte, error) {
return nil, nil
}
func (r *tcpRequest) Stream() bool {
return false
}
func (r *tcpRequest) Codec() codec.Codec {
return r.codec
}