emserver

package
v0.0.0-...-32ff608 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TLSHandler

func TLSHandler() gin.HandlerFunc

TLSHandler setup the https on http server

Types

type GRPCServer

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

GRPCServer represents an instance of a eventmesh server.

func (*GRPCServer) Serve

func (g *GRPCServer) Serve() error

func (*GRPCServer) Stop

func (g *GRPCServer) Stop() error

type GracefulServer

type GracefulServer interface {
	// Serve must start the server loop nearly immediately,
	// or at least not return any errors before the server
	// loop begins. Serve blocks indefinitely, or in other
	// words, until the server is stopped. For UDP-only
	// servers, this method can be a no-op that returns nil.
	Serve() error

	// Stop stops the server. It blocks until the
	// server is completely stopped.
	Stop() error
}

GracefulServer is a Server and Stopper, the stopping of which is graceful (whatever that means for the kind of server being implemented). It must be able to return the address it is configured to listen on so that its listener can be paired with it upon graceful restarts. The net.Listener that a GracefulServer creates must implement the Listener interface for restarts to be graceful (assuming the listener is for TCP).

func NewGRPCServer

func NewGRPCServer(opt *config.GRPCOption) (GracefulServer, error)

NewGRPCServer returns a new GRPC server

func NewHTTPServer

func NewHTTPServer(httpOption *config.HTTPOption) (GracefulServer, error)

NewHTTPServer create new http server by Gin

func NewPProfServer

func NewPProfServer(opt *config.PProfOption) GracefulServer

func NewTCPServer

func NewTCPServer(opt *config.TCPOption) (GracefulServer, error)

type HTTPServer

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

HTTPServer http server to handle eventmesh message from client send by http request

func (*HTTPServer) Serve

func (h *HTTPServer) Serve() error

func (*HTTPServer) Stop

func (h *HTTPServer) Stop() error

type PProfServer

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

func (*PProfServer) Serve

func (p *PProfServer) Serve() error

func (*PProfServer) Stop

func (p *PProfServer) Stop() error

type TCPServer

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

func (*TCPServer) Serve

func (t *TCPServer) Serve() error

func (*TCPServer) Stop

func (t *TCPServer) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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