http

package
Version: v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2015 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Close_chan, Close_done_chan chan int

Functions

func AutoRender

func AutoRender(w http.ResponseWriter, data interface{}, err error)

func RenderDataJson

func RenderDataJson(w http.ResponseWriter, data interface{})

func RenderJson

func RenderJson(w http.ResponseWriter, v interface{})

func RenderMsgJson

func RenderMsgJson(w http.ResponseWriter, msg string)

func Start

func Start()

Types

type Dto

type Dto struct {
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type TcpKeepAliveListener

type TcpKeepAliveListener struct {
	*net.TCPListener
}

tcpKeepAliveListener sets TCP keep-alive timeouts on accepted connections. It's used by ListenAndServe and ListenAndServeTLS so dead TCP connections (e.g. closing laptop mid-download) eventually go away.

func (TcpKeepAliveListener) Accept

func (ln TcpKeepAliveListener) Accept() (c net.Conn, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL