util

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2012 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const BINARY_VERSION = "0.2.15"

Variables

This section is empty.

Functions

func ApiResponse

func ApiResponse(w http.ResponseWriter, statusCode int, statusTxt string, data interface{})

func GetChannelsForTopic

func GetChannelsForTopic(topic string, lookupdHTTPAddrs []string) ([]string, error)

func GetTopicChannelArgs

func GetTopicChannelArgs(rp *ReqParams) (string, string, error)

func StringAdd

func StringAdd(s []string, a string) []string

func StringUnion

func StringUnion(s []string, a []interface{}) []string

func TcpServer

func TcpServer(listener net.Listener, handler TcpHandler)

Types

type MockConn

type MockConn struct {
	io.ReadWriter
}

func (MockConn) Close

func (c MockConn) Close() error

func (MockConn) LocalAddr

func (c MockConn) LocalAddr() net.Addr

func (MockConn) RemoteAddr

func (c MockConn) RemoteAddr() net.Addr

func (MockConn) SetDeadline

func (c MockConn) SetDeadline(t time.Time) error

func (MockConn) SetReadDeadline

func (c MockConn) SetReadDeadline(t time.Time) error

func (MockConn) SetWriteDeadline

func (c MockConn) SetWriteDeadline(t time.Time) error

type ReqParams

type ReqParams struct {
	Body []byte
	// contains filtered or unexported fields
}

func NewReqParams

func NewReqParams(req *http.Request) (*ReqParams, error)

func (*ReqParams) Query

func (r *ReqParams) Query(key string) (string, error)

type StringArray

type StringArray []string

func (*StringArray) Set

func (a *StringArray) Set(s string) error

func (*StringArray) String

func (a *StringArray) String() string

type TcpHandler

type TcpHandler interface {
	Handle(net.Conn)
}

type WaitGroupWrapper

type WaitGroupWrapper struct {
	sync.WaitGroup
}

func (*WaitGroupWrapper) Wrap

func (w *WaitGroupWrapper) Wrap(cb func())

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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