Documentation
¶
Index ¶
- Constants
- Variables
- func NewMyError(msg string) error
- type HTTPServiceGoTSRPCClient
- func (tsc *HTTPServiceGoTSRPCClient) CustomError(ctx go_context.Context, msg string) (retCustomError_0 error, clientErr error)
- func (tsc *HTTPServiceGoTSRPCClient) Error(ctx go_context.Context, msg string) (retError_0 error, clientErr error)
- func (tsc *HTTPServiceGoTSRPCClient) Hello(ctx go_context.Context, msg string) (retHello_0 string, clientErr error)
- func (tsc *HTTPServiceGoTSRPCClient) JoinedError(ctx go_context.Context, msg string) (retJoinedError_0 error, clientErr error)
- func (tsc *HTTPServiceGoTSRPCClient) PkgError(ctx go_context.Context, msg string) (retPkgError_0 error, clientErr error)
- func (tsc *HTTPServiceGoTSRPCClient) WrappedError(ctx go_context.Context, msg string) (retWrappedError_0 error, clientErr error)
- type Handler
- func (h *Handler) CustomError(ctx context.Context, msg string) error
- func (h *Handler) Error(ctx context.Context, args string) error
- func (h *Handler) Hello(ctx context.Context, args string) string
- func (h *Handler) JoinedError(ctx context.Context, args string) error
- func (h *Handler) PkgError(ctx context.Context, args string) error
- func (h *Handler) WrappedError(ctx context.Context, args string) error
- type MyError
- type Service
- type ServiceCustomErrorRequest
- type ServiceCustomErrorResponse
- type ServiceErrorRequest
- type ServiceErrorResponse
- type ServiceGoRPCClient
- func (tsc *ServiceGoRPCClient) CustomError(msg string) (retCustomError_0 error, clientErr error)
- func (tsc *ServiceGoRPCClient) Error(msg string) (retError_0 error, clientErr error)
- func (tsc *ServiceGoRPCClient) Hello(msg string) (retHello_0 string, clientErr error)
- func (tsc *ServiceGoRPCClient) JoinedError(msg string) (retJoinedError_0 error, clientErr error)
- func (tsc *ServiceGoRPCClient) PkgError(msg string) (retPkgError_0 error, clientErr error)
- func (tsc *ServiceGoRPCClient) Start()
- func (tsc *ServiceGoRPCClient) Stop()
- func (tsc *ServiceGoRPCClient) WrappedError(msg string) (retWrappedError_0 error, clientErr error)
- type ServiceGoRPCProxy
- type ServiceGoTSRPCClient
- type ServiceGoTSRPCProxy
- type ServiceHelloRequest
- type ServiceHelloResponse
- type ServiceJoinedErrorRequest
- type ServiceJoinedErrorResponse
- type ServicePkgErrorRequest
- type ServicePkgErrorResponse
- type ServiceWrappedErrorRequest
- type ServiceWrappedErrorResponse
Constants ¶
View Source
const ( ServiceGoTSRPCProxyCustomError = "CustomError" ServiceGoTSRPCProxyError = "Error" ServiceGoTSRPCProxyHello = "Hello" ServiceGoTSRPCProxyJoinedError = "JoinedError" ServiceGoTSRPCProxyPkgError = "PkgError" ServiceGoTSRPCProxyWrappedError = "WrappedError" )
Variables ¶
View Source
var ( ErrGo = pkgerrors.New("go") ErrPkg = pkgerrors.New("pkg error") )
Functions ¶
func NewMyError ¶
Types ¶
type HTTPServiceGoTSRPCClient ¶
func NewDefaultServiceGoTSRPCClient ¶
func NewDefaultServiceGoTSRPCClient(url string) *HTTPServiceGoTSRPCClient
func NewServiceGoTSRPCClient ¶
func NewServiceGoTSRPCClient(url string, endpoint string) *HTTPServiceGoTSRPCClient
func NewServiceGoTSRPCClientWithClient ¶
func NewServiceGoTSRPCClientWithClient(url string, endpoint string, client *go_net_http.Client) *HTTPServiceGoTSRPCClient
func (*HTTPServiceGoTSRPCClient) CustomError ¶
func (tsc *HTTPServiceGoTSRPCClient) CustomError(ctx go_context.Context, msg string) (retCustomError_0 error, clientErr error)
func (*HTTPServiceGoTSRPCClient) Error ¶
func (tsc *HTTPServiceGoTSRPCClient) Error(ctx go_context.Context, msg string) (retError_0 error, clientErr error)
func (*HTTPServiceGoTSRPCClient) Hello ¶
func (tsc *HTTPServiceGoTSRPCClient) Hello(ctx go_context.Context, msg string) (retHello_0 string, clientErr error)
func (*HTTPServiceGoTSRPCClient) JoinedError ¶
func (tsc *HTTPServiceGoTSRPCClient) JoinedError(ctx go_context.Context, msg string) (retJoinedError_0 error, clientErr error)
func (*HTTPServiceGoTSRPCClient) PkgError ¶
func (tsc *HTTPServiceGoTSRPCClient) PkgError(ctx go_context.Context, msg string) (retPkgError_0 error, clientErr error)
func (*HTTPServiceGoTSRPCClient) WrappedError ¶
func (tsc *HTTPServiceGoTSRPCClient) WrappedError(ctx go_context.Context, msg string) (retWrappedError_0 error, clientErr error)
type Service ¶
type Service interface {
Hello(ctx context.Context, msg string) string
Error(ctx context.Context, msg string) error
PkgError(ctx context.Context, msg string) error
JoinedError(ctx context.Context, msg string) error
WrappedError(ctx context.Context, msg string) error
CustomError(ctx context.Context, msg string) error
}
type ServiceCustomErrorRequest ¶
type ServiceCustomErrorRequest struct {
Msg string
}
type ServiceCustomErrorResponse ¶
type ServiceCustomErrorResponse struct {
RetCustomError_0 error
}
type ServiceErrorRequest ¶
type ServiceErrorRequest struct {
Msg string
}
type ServiceErrorResponse ¶
type ServiceErrorResponse struct {
RetError_0 error
}
type ServiceGoRPCClient ¶
func NewServiceGoRPCClient ¶
func NewServiceGoRPCClient(addr string, tlsConfig *tls.Config) *ServiceGoRPCClient
func (*ServiceGoRPCClient) CustomError ¶
func (tsc *ServiceGoRPCClient) CustomError(msg string) (retCustomError_0 error, clientErr error)
func (*ServiceGoRPCClient) Error ¶
func (tsc *ServiceGoRPCClient) Error(msg string) (retError_0 error, clientErr error)
func (*ServiceGoRPCClient) Hello ¶
func (tsc *ServiceGoRPCClient) Hello(msg string) (retHello_0 string, clientErr error)
func (*ServiceGoRPCClient) JoinedError ¶
func (tsc *ServiceGoRPCClient) JoinedError(msg string) (retJoinedError_0 error, clientErr error)
func (*ServiceGoRPCClient) PkgError ¶
func (tsc *ServiceGoRPCClient) PkgError(msg string) (retPkgError_0 error, clientErr error)
func (*ServiceGoRPCClient) Start ¶
func (tsc *ServiceGoRPCClient) Start()
func (*ServiceGoRPCClient) Stop ¶
func (tsc *ServiceGoRPCClient) Stop()
func (*ServiceGoRPCClient) WrappedError ¶
func (tsc *ServiceGoRPCClient) WrappedError(msg string) (retWrappedError_0 error, clientErr error)
type ServiceGoRPCProxy ¶
type ServiceGoRPCProxy struct {
// contains filtered or unexported fields
}
func NewServiceGoRPCProxy ¶
func NewServiceGoRPCProxy(addr string, service Service, tlsConfig *tls.Config) *ServiceGoRPCProxy
func (*ServiceGoRPCProxy) Serve ¶
func (p *ServiceGoRPCProxy) Serve() error
func (*ServiceGoRPCProxy) SetCallStatsHandler ¶
func (p *ServiceGoRPCProxy) SetCallStatsHandler(handler gotsrpc.GoRPCCallStatsHandlerFun)
func (*ServiceGoRPCProxy) Start ¶
func (p *ServiceGoRPCProxy) Start() error
func (*ServiceGoRPCProxy) Stop ¶
func (p *ServiceGoRPCProxy) Stop()
type ServiceGoTSRPCClient ¶
type ServiceGoTSRPCClient interface {
CustomError(ctx go_context.Context, msg string) (retCustomError_0 error, clientErr error)
Error(ctx go_context.Context, msg string) (retError_0 error, clientErr error)
Hello(ctx go_context.Context, msg string) (retHello_0 string, clientErr error)
JoinedError(ctx go_context.Context, msg string) (retJoinedError_0 error, clientErr error)
PkgError(ctx go_context.Context, msg string) (retPkgError_0 error, clientErr error)
WrappedError(ctx go_context.Context, msg string) (retWrappedError_0 error, clientErr error)
}
type ServiceGoTSRPCProxy ¶
type ServiceGoTSRPCProxy struct {
EndPoint string
// contains filtered or unexported fields
}
func NewDefaultServiceGoTSRPCProxy ¶
func NewDefaultServiceGoTSRPCProxy(service Service) *ServiceGoTSRPCProxy
func NewServiceGoTSRPCProxy ¶
func NewServiceGoTSRPCProxy(service Service, endpoint string) *ServiceGoTSRPCProxy
func (*ServiceGoTSRPCProxy) ServeHTTP ¶
func (p *ServiceGoTSRPCProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP exposes your service
type ServiceHelloRequest ¶
type ServiceHelloRequest struct {
Msg string
}
type ServiceHelloResponse ¶
type ServiceHelloResponse struct {
RetHello_0 string
}
type ServiceJoinedErrorRequest ¶
type ServiceJoinedErrorRequest struct {
Msg string
}
type ServiceJoinedErrorResponse ¶
type ServiceJoinedErrorResponse struct {
RetJoinedError_0 error
}
type ServicePkgErrorRequest ¶
type ServicePkgErrorRequest struct {
Msg string
}
type ServicePkgErrorResponse ¶
type ServicePkgErrorResponse struct {
RetPkgError_0 error
}
type ServiceWrappedErrorRequest ¶
type ServiceWrappedErrorRequest struct {
Msg string
}
type ServiceWrappedErrorResponse ¶
type ServiceWrappedErrorResponse struct {
RetWrappedError_0 error
}
Click to show internal directories.
Click to hide internal directories.