initial implementation
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
51
request.go
Normal file
51
request.go
Normal file
@@ -0,0 +1,51 @@
|
||||
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.Reader
|
||||
}
|
||||
|
||||
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.Reader {
|
||||
return r.codec
|
||||
}
|
Reference in New Issue
Block a user