rest

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteProxyRouter

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

RemoteProxyRouter handles incoming http requests

func CreateRemoteProxy

func CreateRemoteProxy(ctx context.Context) (*RemoteProxyRouter, error)

CreateRemoteProxy creates a remote proxy instance

func (*RemoteProxyRouter) ServeHTTP

func (r *RemoteProxyRouter) ServeHTTP(w http.ResponseWriter, req *http.Request)

Default http handler callback which will route to appropriate handler internally

type Server

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

Server wraps http server with pre-configured paths

func Create

func Create(ctx context.Context, host string, port uint) (*Server, error)

Create a new server instance for the given host/port

func (*Server) Start

func (s *Server) Start()

Start the server listening for incoming requests

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the server listening

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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