Documentation
¶
Index ¶
- Variables
- func GetEndpoints(methodPrefix string, handlersStructs ...interface{}) []structure.EndpointConfig
- func ResolveBody(msg *isp.Message) *proto.Value
- func ResolveError(err error) (s *status.Status, ok 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{})
- func WrapBody(value *proto.Value) *isp.Message
- type DefaultService
- type ErrorHandler
- type GrpcServer
- type InternalGrpcClient
- func (bc *InternalGrpcClient) Close(errorHandler errorHandler)
- func (bc *InternalGrpcClient) CloseQuietly()
- func (bc *InternalGrpcClient) Invoke(method string, callerId int, requestBody, responsePointer interface{}, ...) error
- func (bc *InternalGrpcClient) WithMetric(catchMetric func(method string, dur time.Duration, err error)) *InternalGrpcClient
- type RxGrpcClient
- type RxOption
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoAliveConnections = errors.New("No alive connections")
)
Functions ¶
func GetEndpoints ¶
func GetEndpoints(methodPrefix string, handlersStructs ...interface{}) []structure.EndpointConfig
func ResolveBody ¶
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 ¶
func UpdateHandlers(methodPrefix string, handlersStructs ...interface{})
Types ¶
type DefaultService ¶
type DefaultService struct {
// contains filtered or unexported fields
}
func GetDefaultService ¶
func GetDefaultService(methodPrefix string, handlersStructs ...interface{}) *DefaultService
func (*DefaultService) Request ¶
func (df *DefaultService) Request(ctx context.Context, msg *isp.Message) (*isp.Message, error)
func (*DefaultService) RequestStream ¶
func (df *DefaultService) RequestStream(stream isp.BackendService_RequestStreamServer) error
func (*DefaultService) WithErrorHandler ¶
func (df *DefaultService) WithErrorHandler(eh ErrorHandler) *DefaultService
type ErrorHandler ¶
type GrpcServer ¶
type InternalGrpcClient ¶
type InternalGrpcClient struct {
// contains filtered or unexported fields
}
func NewGrpcClient ¶
func NewGrpcClient(addr string, options ...grpc.DialOption) (*InternalGrpcClient, error)
func NewGrpcClientV2 ¶
func NewGrpcClientV2(addrList []string, errorHandler errorHandler, options ...grpc.DialOption) (*InternalGrpcClient, error)
func (*InternalGrpcClient) Close ¶
func (bc *InternalGrpcClient) Close(errorHandler errorHandler)
func (*InternalGrpcClient) CloseQuietly ¶
func (bc *InternalGrpcClient) CloseQuietly()
func (*InternalGrpcClient) Invoke ¶
func (bc *InternalGrpcClient) Invoke(method string, callerId int, requestBody, responsePointer interface{}, mdPairs ...string) error
func (*InternalGrpcClient) WithMetric ¶
func (bc *InternalGrpcClient) WithMetric(catchMetric func(method string, dur time.Duration, err error)) *InternalGrpcClient
type RxGrpcClient ¶
type RxGrpcClient struct {
*InternalGrpcClient
// contains filtered or unexported fields
}
func NewRxGrpcClient ¶
func NewRxGrpcClient(opts ...RxOption) *RxGrpcClient
func (*RxGrpcClient) Close ¶
func (rc *RxGrpcClient) Close()
func (*RxGrpcClient) ReceiveAddressList ¶
func (rc *RxGrpcClient) ReceiveAddressList(list []structure.AddressConfiguration) bool
func (*RxGrpcClient) Visit ¶
func (rc *RxGrpcClient) Visit(visitor func(c *InternalGrpcClient) error) error
type RxOption ¶
type RxOption func(rc *RxGrpcClient)
func WithDialOptions ¶
func WithDialOptions(opts ...grpc.DialOption) RxOption
func WithDialingErrorHandler ¶
func WithDialingErrorHandler(eh errorHandler) RxOption
Click to show internal directories.
Click to hide internal directories.