httputil

package
v0.0.0-...-eab3a14 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeInfoHandler

func MakeInfoHandler(c Consumer, node string, started time.Time) http.HandlerFunc

MakeInfoHandler returns an HTTP handler which can be added to an exposed HTTP server mux by Metafora applications to provide operators with basic node introspection.

Types

type Consumer

type Consumer interface {
	Frozen() bool
	Tasks() []metafora.Task
}

Consumer contains just the Metafora methods exposed by the HTTP introspection endpoints.

type InfoResponse

type InfoResponse struct {
	Frozen  bool            `json:"frozen"`
	Node    string          `json:"node"`
	Started time.Time       `json:"started"`
	Tasks   []metafora.Task `json:"tasks"`
}

InfoResponse is the JSON response marshalled by the MakeInfoHandler.

Jump to

Keyboard shortcuts

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