package
0.0.0-20230710142318-f8a288cd3046
Repository: https://github.com/packethost/pkg.git
Documentation: pkg.go.dev
# Functions
LoadX509KeyPair will setup server as a secure server by reading the cert and key from the provided file locations.
NewServer creates a new grpc server.
Port will set the port the server will bind to, Port must be > 0.
Register will call the callback func after the main grpc service has been setup.
ServerOption will add the opt param to the underlying grpc.NewServer() call.
StreamInterceptor adds the argument to the list of interceptors in a grpc_middleware.Chain Logging and Prometheus interceptors are always included in the set.
UnaryInterceptor adds the argument to the list of interceptors in a grpc_middleware.Chain Logging, Prometheus, and OpenTelemetry interceptors are always included in the set.
X509KeyPair will setup server as a secure server using the provided cert and key This function overrides GRPC_CERT and GRPC_KEY environment variables.
# Type aliases
The Option type describes functions that operate on Server during NewServer.
The ServiceRegister type is used as a callback once the underlying grpc server is setup to register the main service.