plex

package module
v0.0.0-...-6367170 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 10 Imported by: 1

README

plex

Documentation License Coverage Go Report Card

A multiplexer that allows Google Remote Procedure Call and HTTP server listening on the same port

Installation

$ go get -u github.com/phogolabs/plex

Getting started

For more information about how to use the package, have a look the example service implementation.

Contributing

We are open for any contributions. Just fork the project.

Documentation

Index

Constants

View Source
const (
	// ErrClosedConn occurs when the connection is closed
	ErrClosedConn = flaw.ErrorConstant("use of closed network connection")
)

Variables

View Source
var SetStatusCode = grpc.SetStatusCode

SetStatusCode sets the status code

Functions

This section is empty.

Types

type Server

type Server struct {
	Addr    string
	Gateway *grpc.Gateway
	Proxy   *http.Proxy
}

Server represents a server

func NewServer

func NewServer() *Server

NewServer creates a new server

func (*Server) ListenAndServe

func (srv *Server) ListenAndServe() error

ListenAndServe listens on the TCP network address srv.Addr and then calls Serve to handle requests on incoming connections. Accepted connections are configured to enable TCP keep-alives.

func (*Server) Serve

func (srv *Server) Serve(listener net.Listener) (err error)

Serve accepts incoming connections on the Listener l, creating a new service goroutine for each.

func (*Server) Shutdown

func (srv *Server) Shutdown(ctx context.Context) error

Shutdown shutdowns the server

Directories

Path Synopsis
example
sdk
Package sdk is a reverse proxy.
Package sdk is a reverse proxy.
service
health
Package health is a reverse proxy.
Package health is a reverse proxy.

Jump to

Keyboard shortcuts

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