app

package
v0.0.0-...-d07545a Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2015 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUnit

func CreateUnit(app *App) http.Handler

CreateUnit creates a new fleet unit.

func DeleteUnit

func DeleteUnit(app *App) http.Handler

DeleteUnit deletes the fleet unit with the given name.

func GetInfo

func GetInfo(app *App) http.Handler

GetInfo returns some status information.

func GetUnit

func GetUnit(app *App) http.Handler

GetUnit returns a single fleet unit for the given name.

func GetUnits

func GetUnits(app *App) http.Handler

GetUnits returns a collection of all fleet units.

Types

type App

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

App encapsulates the resources of the web service.

func NewApp

func NewApp(d *DB) *App

NewApp creates and configures a new application instance.

func (*App) DB

func (a *App) DB() *DB

DB is the application's database.

func (*App) ListenAndServe

func (a *App) ListenAndServe(port int) error

ListenAndServe starts the application on the given port.

func (*App) Router

func (a *App) Router() *mux.Router

Router is the application's router.

type DB

type DB struct {
	*bolt.DB
}

DB encapsulates the database resources.

func (*DB) Open

func (db *DB) Open(path string, mode os.FileMode) error

Open and initialize the database.

type FleetClient

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

FleetClient encapsulates the fleet client.

func NewFleetClient

func NewFleetClient(endpoint string) *FleetClient

NewFleetClient returns a new fleet client.

func (*FleetClient) CreateUnit

func (fc *FleetClient) CreateUnit(name string, uf *unit.UnitFile) (*schema.Unit, error)

CreateUnit submits a new fleet unit.

func (*FleetClient) ListMachines

func (fc *FleetClient) ListMachines() ([]machine.MachineState, error)

ListMachines lists the active CoreOS nodes in the fleet.

type FleetUnit

type FleetUnit struct {
	Name string                 `json:"name"`
	Body map[string]interface{} `json:"body"`
}

A FleetUnit represents a fleet unit.

type FleetUnits

type FleetUnits []FleetUnit

Units is a collection of fleet units.

type Route

type Route struct {
	Name    string
	Method  string
	Pattern string
	Handler http.Handler
}

Route represents a route for the HTTP handler.

type Routes

type Routes []Route

Routes is a collection of routes.

Jump to

Keyboard shortcuts

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