Documentation ¶
Index ¶
- func GetEndpointConfig(methodPrefix string, f reflect.StructField) structure.EndpointDescriptor
- func GetEndpoints(methodPrefix string, handlersStructs ...interface{}) []structure.EndpointDescriptor
- func ResolveBody(msg *isp.Message) *proto.Value
- func ResolveError(err error) (_ error, mustLog bool)
- func ServerIsInitialized() bool
- func StartBackendGrpcServer(addr structure.AddressConfiguration, service *DefaultService, ...)
- func StartBackendGrpcServerOn(addr structure.AddressConfiguration, ln net.Listener, service *DefaultService, ...)
- func StopGrpcServer()
- func UpdateHandlers(methodPrefix string, handlersStructs ...interface{}) error
- func WrapBody(value *proto.Value) *isp.Message
- type DefaultService
- func (df *DefaultService) Request(ctx context.Context, msg *isp.Message) (*isp.Message, error)
- func (df *DefaultService) RequestStream(stream isp.BackendService_RequestStreamServer) error
- func (df *DefaultService) WithErrorHandler(eh ErrorHandler) *DefaultService
- func (df *DefaultService) WithInterceptor(interceptor Interceptor) *DefaultService
- func (df *DefaultService) WithPostProcessors(pps ...PostProcessor) *DefaultService
- func (df *DefaultService) WithValidator(validator Validator) *DefaultService
- type ErrorHandler
- type GrpcClient
- type GrpcServer
- type Interceptor
- type InvokeOption
- type PostProcessor
- type RequestCtx
- type RxGrpcClient
- func (rc *RxGrpcClient) Close() error
- func (rc *RxGrpcClient) Conn() isp.BackendServiceClient
- func (rc *RxGrpcClient) Invoke(method string, callerId int, requestBody, responsePointer interface{}, ...) error
- func (rc *RxGrpcClient) InvokeStream(method string, callerId int, consumer streaming.StreamConsumer) error
- func (rc *RxGrpcClient) ReceiveAddressList(list []structure.AddressConfiguration) bool
- type RxOption
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEndpointConfig ¶
func GetEndpointConfig(methodPrefix string, f reflect.StructField) structure.EndpointDescriptor
Deprecated
func GetEndpoints ¶
func GetEndpoints(methodPrefix string, handlersStructs ...interface{}) []structure.EndpointDescriptor
Deprecated
func ResolveError ¶
func ServerIsInitialized ¶
func ServerIsInitialized() bool
func StartBackendGrpcServer ¶
func StartBackendGrpcServer(addr structure.AddressConfiguration, service *DefaultService, opt ...grpc.ServerOption)
func StartBackendGrpcServerOn ¶
func StartBackendGrpcServerOn(addr structure.AddressConfiguration, ln net.Listener, service *DefaultService, opt ...grpc.ServerOption)
func StopGrpcServer ¶
func StopGrpcServer()
func UpdateHandlers ¶
Types ¶
type DefaultService ¶
type DefaultService struct {
// contains filtered or unexported fields
}
func GetDefaultService ¶
func GetDefaultService(methodPrefix string, handlersStructs ...interface{}) *DefaultService
Deprecated
func NewDefaultService ¶
func NewDefaultService(descriptors []structure.EndpointDescriptor) *DefaultService
func (*DefaultService) RequestStream ¶
func (df *DefaultService) RequestStream(stream isp.BackendService_RequestStreamServer) error
func (*DefaultService) WithErrorHandler ¶
func (df *DefaultService) WithErrorHandler(eh ErrorHandler) *DefaultService
func (*DefaultService) WithInterceptor ¶
func (df *DefaultService) WithInterceptor(interceptor Interceptor) *DefaultService
func (*DefaultService) WithPostProcessors ¶
func (df *DefaultService) WithPostProcessors(pps ...PostProcessor) *DefaultService
func (*DefaultService) WithValidator ¶
func (df *DefaultService) WithValidator(validator Validator) *DefaultService
type ErrorHandler ¶
type GrpcClient ¶ added in v2.3.0
type GrpcClient interface { ReceiveAddressList([]structure.AddressConfiguration) bool Invoke(method string, callerId int, requestBody, responsePointer interface{}, opts ...InvokeOption) error InvokeStream(method string, callerId int, consumer streaming.StreamConsumer) error Conn() isp.BackendServiceClient Close() error }
type GrpcServer ¶
func (*GrpcServer) Start ¶ added in v2.3.0
func (s *GrpcServer) Start()
func (*GrpcServer) UpdateHandlers ¶ added in v2.3.0
func (s *GrpcServer) UpdateHandlers(methodPrefix string, handlersStructs ...interface{}) error
type Interceptor ¶
type Interceptor func(ctx RequestCtx, proceed func() (interface{}, error)) (interface{}, error)
type InvokeOption ¶
type InvokeOption func(opts *invokeOpts)
func WithCallOptions ¶ added in v2.3.0
func WithCallOptions(callOpts ...grpc.CallOption) InvokeOption
func WithContext ¶ added in v2.5.0
func WithContext(ctx context.Context) InvokeOption
func WithMetadata ¶
func WithMetadata(md metadata.MD) InvokeOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) InvokeOption
type PostProcessor ¶
type PostProcessor func(ctx RequestCtx)
type RequestCtx ¶
type RxGrpcClient ¶
type RxGrpcClient struct {
// contains filtered or unexported fields
}
func NewRxGrpcClient ¶
func NewRxGrpcClient(opts ...RxOption) *RxGrpcClient
NewRxGrpcClient is incompatible with grpc.WithBlock() option
func (*RxGrpcClient) Close ¶
func (rc *RxGrpcClient) Close() error
func (*RxGrpcClient) Conn ¶ added in v2.3.0
func (rc *RxGrpcClient) Conn() isp.BackendServiceClient
func (*RxGrpcClient) Invoke ¶ added in v2.3.0
func (rc *RxGrpcClient) Invoke(method string, callerId int, requestBody, responsePointer interface{}, opts ...InvokeOption) error
func (*RxGrpcClient) InvokeStream ¶ added in v2.3.0
func (rc *RxGrpcClient) InvokeStream(method string, callerId int, consumer streaming.StreamConsumer) error
func (*RxGrpcClient) ReceiveAddressList ¶
func (rc *RxGrpcClient) ReceiveAddressList(list []structure.AddressConfiguration) bool
type RxOption ¶
type RxOption func(rc *RxGrpcClient)
func WithConnectionsPerAddress ¶ added in v2.3.0
func WithDialOptions ¶
func WithDialOptions(opts ...grpc.DialOption) RxOption
type Validator ¶
type Validator func(ctx RequestCtx, mappedRequestBody interface{}) error
Click to show internal directories.
Click to hide internal directories.