grpc

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGatewayHandler

func CreateGatewayHandler(
	grpcPort uint16,
	mux *http.ServeMux,
	apiBasePath string,
	stripPrefix bool,
	ssl bool,
	corsAllowedOrigins []string,
	spec string,
	handlers ...func(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error,
) (shutdown func())

CreateGatewayHandler configures the gRPC API gateway by registering relevant handlers with the given mux.

func CreateGrpcServer

func CreateGrpcServer(
	keepaliveParams keepalive.ServerParameters,
	keepaliveEnforcementPolicy keepalive.EnforcementPolicy,
	authServices []auth.AuthService,
	tlsConfig configuration.TlsConfig,
	logrusOptions ...grpc_logrus.Option,
) *grpc.Server

CreateGrpcServer creates a gRPC server (by calling grpc.NewServer) with settings specific to this project, and registers services for, e.g., logging and authentication.

func CreateShutdownHandler added in v0.3.48

func CreateShutdownHandler(ctx *armadacontext.Context, gracePeriod time.Duration, grpcServer *grpc.Server) func() error

CreateShutdownHandler returns a function that shuts down the grpcServer when the context is closed. The server is given gracePeriod to perform a graceful showdown and is then forcably stopped if necessary

func Listen

func Listen(port uint16, grpcServer *grpc.Server, wg *sync.WaitGroup)

TODO We don't need this function. Just do this at the caller.

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