api

package
v0.0.0-...-28e320e Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package api provides the structures for the JSON API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string, result interface{}) interface{}

Get request to an API endpoint from dockbroker.

func Post

func Post(url string, payload interface{}, result interface{}) interface{}

Post request to an API endpoint from dockbroker.

Types

type Broker

type Broker struct {
	Name string
	Note string
}

Broker describes the broker.

type Job

type Job struct {
	Name        string
	Submitter   string
	MaxDuration time.Duration
	EstDuration time.Duration
}

Job describes a job.

type Offer

type Offer struct {
	Price             float64
	EstCompletionTime time.Time
}

Offer holds the data about a broker's offer.

type SubmittedJob

type SubmittedJob struct {
	Offer
	ID int
}

SubmittedJob describes a job that is in the queue now.

Jump to

Keyboard shortcuts

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