vexserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRSA

func GenerateRSA()

Types

type Client

type Client struct {
	ID string
	net.Conn
	*ssh.ServerConn
	Listeners   map[string]net.Listener
	Addr        string
	Port        uint32
	ListenMutex *sync.Mutex
}

type Config

type Config struct {
	Domain         string
	PrivateKeyFile string
	SSHListenAddr  string
	HTTPListenAddr string
}

type HTTPServer

type HTTPServer struct {
	*http.Server
	// contains filtered or unexported fields
}

HTTPServer extends net/http server and adds graceful shutdowns

func NewHTTPServer

func NewHTTPServer() *HTTPServer

NewHTTPServer creates a new HTTPServer instance

func (*HTTPServer) Close

func (h *HTTPServer) Close() error

Close closes the HTTPServer instance

func (*HTTPServer) GoListenAndServe

func (h *HTTPServer) GoListenAndServe(addr string, handler http.Handler) error

GoListenAndServe starts HTTPServer instance and listens on specified addr

func (*HTTPServer) Wait

func (h *HTTPServer) Wait() error

Wait waits for server to be stopped

type SSHServer

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

func NewSSHServer

func NewSSHServer() *SSHServer

func (*SSHServer) Close

func (s *SSHServer) Close() error

func (*SSHServer) Start

func (s *SSHServer) Start(addr string, privateKey string, domain string) error

func (*SSHServer) Wait

func (s *SSHServer) Wait() error

type Server

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

func NewServer

func NewServer(config *Config) *Server

func (*Server) Run

func (s *Server) Run() error

Jump to

Keyboard shortcuts

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