server

package
v0.0.0-...-568b1a2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PermissionServer

type PermissionServer struct {
	*grpc.Server
	// contains filtered or unexported fields
}

PermissionServer is a structure that holds the permission grpc server and its services and configuration.

func NewServer

func NewServer(logger *logrus.Logger) *PermissionServer

NewServer configures and creates a grpc.Server instance with the download service health check service. Configure using environment variables. `HEALTH_CHECK_INTERVAL`: Interval to update serving state of the health check server. `PORT`: TCP port on which the grpc server would serve on.

func (PermissionServer) Serve

func (s PermissionServer) Serve(lis net.Listener)

Serve accepts incoming connections on the listener `lis`, creating a new ServerTransport and service goroutine for each. The service goroutines read gRPC requests and then call the registered handlers to reply to them. Serve returns when `lis.Accept` fails with fatal errors. `lis` will be closed when this method returns. If `lis` is nil then Serve creates a `net.Listener` with "tcp" network listening on the configured `TCP_PORT`, which defaults to "8080". Serve will return a non-nil error unless Stop or GracefulStop is called.

Jump to

Keyboard shortcuts

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