http

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Code    APIResponseCode
	Message string
	Details interface{}
}

APIResponse is a response returned as JSON to various requests.

type APIResponseCode

type APIResponseCode int

APIResponseCode is an OK/ERROR response code

const (
	ERROR APIResponseCode = iota
	OK
)

func (*APIResponseCode) MarshalJSON

func (this *APIResponseCode) MarshalJSON() ([]byte, error)

func (*APIResponseCode) String

func (this *APIResponseCode) String() string

type HttpAPI

type HttpAPI struct{}
var API HttpAPI = HttpAPI{}

func (*HttpAPI) Audit

func (this *HttpAPI) Audit(params martini.Params, r render.Render, req *http.Request)

Audit provides listof audit entries by given page number

func (*HttpAPI) BeginMaintenance

func (this *HttpAPI) BeginMaintenance(params martini.Params, r render.Render)

BeginMaintenance begins maintenance mode for given instance

func (*HttpAPI) Cluster

func (this *HttpAPI) Cluster(params martini.Params, r render.Render)

Cluster provides list of instances in given cluster

func (*HttpAPI) Clusters

func (this *HttpAPI) Clusters(params martini.Params, r render.Render)

Clusters provides list of known clusters

func (*HttpAPI) Discover

func (this *HttpAPI) Discover(params martini.Params, r render.Render)

Discover starts an asynchronuous discovery for an instance

func (*HttpAPI) EndMaintenance

func (this *HttpAPI) EndMaintenance(params martini.Params, r render.Render)

EndMaintenance terminates maintenance mode

func (*HttpAPI) EndMaintenanceByInstanceKey

func (this *HttpAPI) EndMaintenanceByInstanceKey(params martini.Params, r render.Render)

EndMaintenanceByInstanceKey terminates maintenance mode for given instance

func (*HttpAPI) Forget

func (this *HttpAPI) Forget(params martini.Params, r render.Render)

Forget removes an instance entry fro backend database

func (*HttpAPI) Instance

func (this *HttpAPI) Instance(params martini.Params, r render.Render)

Instance reads and returns an instance's details.

func (*HttpAPI) Maintenance

func (this *HttpAPI) Maintenance(params martini.Params, r render.Render)

Maintenance provides list of instance under active maintenance

func (*HttpAPI) MoveBelow

func (this *HttpAPI) MoveBelow(params martini.Params, r render.Render)

MoveUp attempts to move an instance below its supposed sibling

func (*HttpAPI) MoveUp

func (this *HttpAPI) MoveUp(params martini.Params, r render.Render)

MoveUp attempts to move an instance up the topology

func (*HttpAPI) Problems

func (this *HttpAPI) Problems(params martini.Params, r render.Render, req *http.Request)

Problems provides list of instances with known problems

func (*HttpAPI) Refresh

func (this *HttpAPI) Refresh(params martini.Params, r render.Render)

Refresh synchronuously re-reads a topology instance

func (*HttpAPI) RegisterRequests

func (this *HttpAPI) RegisterRequests(m *martini.ClassicMartini)

RegisterRequests makes for the de-facto list of known API calls

func (*HttpAPI) Search

func (this *HttpAPI) Search(params martini.Params, r render.Render, req *http.Request)

Search provides list of instances matching given search param via various criteria.

func (*HttpAPI) StartSlave

func (this *HttpAPI) StartSlave(params martini.Params, r render.Render)

StartSlave starts replication on given instance

func (*HttpAPI) StopSlave

func (this *HttpAPI) StopSlave(params martini.Params, r render.Render)

StartSlave stops replication on given instance

type HttpWeb

type HttpWeb struct{}

HttpWeb is the web requests server, mapping each request to a web page

var Web HttpWeb = HttpWeb{}

func (*HttpWeb) About

func (this *HttpWeb) About(params martini.Params, r render.Render)

func (*HttpWeb) Audit

func (this *HttpWeb) Audit(params martini.Params, r render.Render)

func (*HttpWeb) Cluster

func (this *HttpWeb) Cluster(params martini.Params, r render.Render)

func (*HttpWeb) Discover

func (this *HttpWeb) Discover(params martini.Params, r render.Render)

func (*HttpWeb) FAQ

func (this *HttpWeb) FAQ(params martini.Params, r render.Render)

func (*HttpWeb) Home

func (this *HttpWeb) Home(params martini.Params, r render.Render)

func (*HttpWeb) RegisterRequests

func (this *HttpWeb) RegisterRequests(m *martini.ClassicMartini)

RegisterRequests makes for the de-facto list of known Web calls

func (*HttpWeb) Search

func (this *HttpWeb) Search(params martini.Params, r render.Render, req *http.Request)

Jump to

Keyboard shortcuts

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