Documentation ¶
Index ¶
- Variables
- func ClientIP(ctx context.Context) string
- func CodeFromHTTPStatus(status int) codes.Code
- func ContextWithServiceName(ctx context.Context, serverName string) context.Context
- func CreateStreamHandler(s *ServeGRPC, ops ...courier.IOperator) grpc.StreamHandler
- func GetFieldDisplayName(field reflect.StructField) string
- func HTTPStatusFromCode(code codes.Code) int
- func MarshalOperator(stream grpc.ServerStream, operator courier.IOperator) error
- func MsgPackUnmarshal(data []byte, v interface{}) error
- type DecodeStreamFunc
- type GRPCRequest
- type MockServer
- type MsgPackCodec
- type ServeGRPC
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ContextKeyServerName = uuid.New().String()
)
Functions ¶
func CodeFromHTTPStatus ¶
func ContextWithServiceName ¶
func CreateStreamHandler ¶
func CreateStreamHandler(s *ServeGRPC, ops ...courier.IOperator) grpc.StreamHandler
func GetFieldDisplayName ¶
func GetFieldDisplayName(field reflect.StructField) string
func HTTPStatusFromCode ¶
func MarshalOperator ¶
func MarshalOperator(stream grpc.ServerStream, operator courier.IOperator) error
func MsgPackUnmarshal ¶
Types ¶
type DecodeStreamFunc ¶
type GRPCRequest ¶
type GRPCRequest struct { RequestID string BaseURL string ServerName string Method string Timeout time.Duration Req interface{} Metadata courier.Metadata }
func (*GRPCRequest) Do ¶
func (grpcRequest *GRPCRequest) Do() (result courier.Result)
type MockServer ¶
type MockServer interface { }
type MsgPackCodec ¶
type MsgPackCodec struct { }
func (*MsgPackCodec) Marshal ¶
func (c *MsgPackCodec) Marshal(v interface{}) ([]byte, error)
func (*MsgPackCodec) String ¶
func (c *MsgPackCodec) String() string
func (*MsgPackCodec) Unmarshal ¶
func (c *MsgPackCodec) Unmarshal(data []byte, v interface{}) error
type ServeGRPC ¶
type ServeGRPC struct { IP string Port int WriteTimeout time.Duration ReadTimeout time.Duration Name string }
func (ServeGRPC) DockerDefaults ¶
func (s ServeGRPC) DockerDefaults() conf.DockerDefaults
func (ServeGRPC) MarshalDefaults ¶
func (s ServeGRPC) MarshalDefaults(v interface{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.