grpcserver

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCerts added in v0.7.0

func GetCerts(certsDir string) (*tls.Certificate, error)

GetCerts returns a TLS certificate. An error is returned for any failure.

The public key is expected to be named "bundle.pem" and the private key "server-key.pem".

func SetupGRPC

func SetupGRPC(ctx context.Context, r Registrar, listenAddr string, opts []grpc.ServerOption, errCh chan<- error) (string, error)

SetupGRPC opens a listener and serves a given Registrar's APIs on a gRPC server and returns the listener's address or an error.

Types

type Registrar added in v0.7.0

type Registrar interface {
	Register(*grpc.Server)
}

Registrar is an interface for registering APIs on a gRPC server.

Jump to

Keyboard shortcuts

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