api

package
v0.0.0-...-5aa14c8 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRootPath = "/"

	DefaultListClusterSize = 10
)

Variables

View Source
var (
	ErrMethodNotFound = errors.New("Method not Allowed")

	ErrBadRequest = errors.New("Bad Request")

	ErrNotImplemented = errors.New("Not Implemented")
)
View Source
var (
	ErrNoCandidateFound = errors.New("No candidate found")
)

Functions

func ClusterCreate

func ClusterCreate(w http.ResponseWriter, r *http.Request)

func ClusterList

func ClusterList(w http.ResponseWriter, r *http.Request)

func GetServeMux

func GetServeMux() *http.ServeMux

func GetServer

func GetServer() *http.Server

func NewStreamWriter

func NewStreamWriter(w http.ResponseWriter) io.Writer

Types

type Clusters

type Clusters struct {
	Root  string
	Size  int
	Nodes []string
}

type Dir

type Dir []http.Dir

func (Dir) Open

func (d Dir) Open(name string) (http.File, error)

type StreamWriter

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

func (*StreamWriter) Write

func (s *StreamWriter) Write(data []byte) (n int, err error)

type VarHandler

type VarHandler interface {
	ServeHTTP(w http.ResponseWriter, r *http.Request, args []string)
}

type VarHandlerFunc

type VarHandlerFunc func(http.ResponseWriter, *http.Request, []string)

func (VarHandlerFunc) ServeHTTP

func (n VarHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request, args []string)

type VarServeMux

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

func (*VarServeMux) Handle

func (v *VarServeMux) Handle(pattern string, handler VarHandler)

func (*VarServeMux) HandleFunc

func (v *VarServeMux) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request, []string))

func (*VarServeMux) ServeHTTP

func (v *VarServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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