Documentation
¶
Index ¶
- Constants
- func FuncResponse_Args(req *services.RpcFuncRequest, head FuncHeader) (resp *services.RpcFuncResponse)
- func FuncResponse_MsgCode(req *services.RpcFuncRequest, codemsg RespHead_CodeMsg, errmsg ...string) (resp *services.RpcFuncResponse)
- type Caller
- type FuncHeader
- type FuncService
- type FuncServiceServerConfig
- type RespHead_CodeMsg
- type SimpleFuncServiceServerImpl
- func (this *SimpleFuncServiceServerImpl) Ack(ctx context.Context, ack *services.Ack) (*services.Ack, error)
- func (this *SimpleFuncServiceServerImpl) FuncInvoker(ctx context.Context, funcRequest *services.RpcFuncRequest) (resp *services.RpcFuncResponse, err error)
- func (*SimpleFuncServiceServerImpl) GetServiceFunList(ctx context.Context, servicePoint *services.ServicePointInfo) (funcList *services.ServiceFunList, err error)
- func (*SimpleFuncServiceServerImpl) GetServiceStatus(ctx context.Context, servicePoint *services.ServicePointInfo) (status *services.ServiceStatus, err error)
Constants ¶
View Source
const ( RpcFuncRespCode_Success = iota RpcFuncRespCode_nilRequest )
View Source
const ( RpcFuncRespHead_MsgCode = "MsgCode" RpcFuncRespHead_Message = "Message" )
Variables ¶
This section is empty.
Functions ¶
func FuncResponse_Args ¶
func FuncResponse_Args(req *services.RpcFuncRequest, head FuncHeader) (resp *services.RpcFuncResponse)
func FuncResponse_MsgCode ¶
func FuncResponse_MsgCode(req *services.RpcFuncRequest, codemsg RespHead_CodeMsg, errmsg ...string) (resp *services.RpcFuncResponse)
Types ¶
type Caller ¶
type Caller func(head FuncHeader, reqbody []byte) (respHead FuncHeader, respBody []byte, err error)
type FuncHeader ¶
type FuncHeader map[string]*services.RpcFuncHeader
func MakeHead ¶
func MakeHead() FuncHeader
func NewFuncHead ¶
func NewFuncHead(code, msg string) FuncHeader
func NewFuncHead2 ¶
func NewFuncHead2(codemsg RespHead_CodeMsg, errmsg ...string) FuncHeader
func (FuncHeader) Put ¶
func (this FuncHeader) Put(k, v string) FuncHeader
func (FuncHeader) PutHeader ¶
func (this FuncHeader) PutHeader(header *services.RpcFuncHeader) FuncHeader
type FuncService ¶
type FuncServiceServerConfig ¶
type FuncServiceServerConfig struct { Fcservice FuncService // contains filtered or unexported fields }
type RespHead_CodeMsg ¶
type RespHead_CodeMsg [2]string
var ( RespHead_Success RespHead_CodeMsg = [2]string{"0", "successful"} RespHead_Error RespHead_CodeMsg = [2]string{"1", "No Parsed Error"} RespHead_Invalid RespHead_CodeMsg = [2]string{"2", "invalid parameter"} RespHead_Invalid_Ack RespHead_CodeMsg = [2]string{"3", " ack is invaild status,it right value has not be zero."} RespHead_CodeNotMatch RespHead_CodeMsg = [2]string{"4", "service code is not match this service."} RespHead_noSupportVersion RespHead_CodeMsg = [2]string{"5", "this service not support that version"} RespHead_noSupportFuncId RespHead_CodeMsg = [2]string{"6", "this service not support that funcId"} RespHead_funcError RespHead_CodeMsg = [2]string{"7", "module-func call has been error."} )
type SimpleFuncServiceServerImpl ¶
type SimpleFuncServiceServerImpl struct {
Fsconfig *FuncServiceServerConfig
}
func (*SimpleFuncServiceServerImpl) Ack ¶
func (this *SimpleFuncServiceServerImpl) Ack(ctx context.Context, ack *services.Ack) (*services.Ack, error)
func (*SimpleFuncServiceServerImpl) FuncInvoker ¶
func (this *SimpleFuncServiceServerImpl) FuncInvoker(ctx context.Context, funcRequest *services.RpcFuncRequest) (resp *services.RpcFuncResponse, err error)
func (*SimpleFuncServiceServerImpl) GetServiceFunList ¶
func (*SimpleFuncServiceServerImpl) GetServiceFunList(ctx context.Context, servicePoint *services.ServicePointInfo) (funcList *services.ServiceFunList, err error)
func (*SimpleFuncServiceServerImpl) GetServiceStatus ¶
func (*SimpleFuncServiceServerImpl) GetServiceStatus(ctx context.Context, servicePoint *services.ServicePointInfo) (status *services.ServiceStatus, err error)
Click to show internal directories.
Click to hide internal directories.