api

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(logger *logrus.Logger, redisPool *redis.Pool) *http.Server

NewServer ...

Types

type Handler

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

Handler handles the API HTTP server

func NewHandler

func NewHandler(logger *logrus.Logger, redisPool *redis.Pool) *Handler

NewHandler creates a new API handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP serves the wormhole API

type SingleConnListener

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

SingleConnListener is a listener that accepts a single, stored, conn

func NewSingleConnListener

func NewSingleConnListener(l net.Listener, c net.Conn) *SingleConnListener

NewSingleConnListener creates a new single connection listener

func (*SingleConnListener) Accept

func (l *SingleConnListener) Accept() (net.Conn, error)

Accept accepts a connection once and then EOFs

func (*SingleConnListener) Addr

func (l *SingleConnListener) Addr() net.Addr

Addr defers to the stored original listener

func (*SingleConnListener) Close

func (l *SingleConnListener) Close() error

Close does nothing

Jump to

Keyboard shortcuts

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