server

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleStatus

func HandleStatus(storage port.Storage) gin.HandlerFunc

HandleStatus is an endpoint providing information and the status of the server, usually pinged for healthchecks by other services.

func JSONLogMiddleware

func JSONLogMiddleware() gin.HandlerFunc

JSONLogMiddleware logs a gin HTTP request in JSON format.

func NewRouter

func NewRouter(
	jobService port.JobService,
	resultService port.ResultService,
	pipelineService port.PipelineService,
	taskService port.TaskService,
	jobQueue port.JobQueue,
	storage port.Storage, loggingFormat string) *gin.Engine

NewRouter initializes and returns a new gin.Engine instance.

Types

type GRPCServer

type GRPCServer struct {
	// contains filtered or unexported fields
}

GRPCServer represents a gRPC server.

func NewGRPCServer

func NewGRPCServer(srv *grpc.Server, listener net.Listener, logger *logrus.Logger) *GRPCServer

NewGRPCServer creates and returns a new GRPCServer instance.

func (*GRPCServer) GracefullyStop

func (s *GRPCServer) GracefullyStop()

GracefullyStop gracefully stops the server.

func (*GRPCServer) Serve

func (s *GRPCServer) Serve()

Serve starts the server.

type HTTPServer

type HTTPServer struct {
	// contains filtered or unexported fields
}

HTTPServer represents an HTTP server.

func NewHTTPServer

func NewHTTPServer(srv http.Server, logger *logrus.Logger) *HTTPServer

NewHTTPServer creates and returns a new HTTPServer instance.

func (*HTTPServer) GracefullyStop

func (s *HTTPServer) GracefullyStop()

GracefullyStop gracefully stops the server.

func (*HTTPServer) Serve

func (s *HTTPServer) Serve()

Serve starts the server.

Jump to

Keyboard shortcuts

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