xgrpc

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServerUnavailable = errors.New("gRPC server not available")
View Source
var ErrServiceUnavailable = errors.New("gRPC service not available")

Functions

func CheckServiceAvailability

func CheckServiceAvailability(address, serviceSymbol string, opts ...grpc.DialOption) error

CheckServiceAvailability connects using address and checks if the gRPC symbol is available. The serviceSymbol must be of the format `<package>.<service>`.

When the method is not available, error ErrServiceUnavailable is returned.

The opts argument can be used pass options for the grpc.Dial function.

func ErrorFromRPC

func ErrorFromRPC(err error) error

ErrorFromRPC cleans up errors returned by the proto package. Errors with codes.Unavailable will have ErrServerUnavailable wrapped into the error.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL