auctioneer

package
v0.0.0-...-4ca588f Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(s *mgo.Session, reset chan bool)

func Ticker

func Ticker(session *mgo.Session, reset chan bool, newConfiguration *config.Configuration)

Types

type Auction

type Auction struct {
	ID    string    `json:"id"`
	Stage int       `json:"stage"`
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
	Live  bool      `json:"live"`
	Items []Item    `json:"items"`
	Nodes []Node    `json:"nodes"`
}

type Bid

type Bid struct {
	ID          string    `json:"id"`
	AuctionID   string    `json:"auction_id"`
	ItemID      string    `json:"item_id"`
	UserID      string    `json:"user_id"`
	Valuation   int       `json:"valuation"`
	UserTag     string    `json:"user_tag"`
	TimeCreated time.Time `json:"time_created"`
}

type Item

type Item struct {
	ID              string `json:"id"`
	Memory          int    `json:"memory"`
	ParentNode      Node   `json:"parent_node"`
	ParentAuctionID string `json:"parent_auction_id"`
	Bids            []Bid  `json:"bids"`
	Leading         Bid    `json:"leading_bid"`
	Price           int    `json:"price"`
}

type Node

type Node struct {
	ID              string `json:"id"`
	TotalMemory     int    `json:"total_memory"`
	AvailableMemory int    `json:"available_memory"`
	ReservedMemory  int    `json:"reserved_memory"`
	Location        string `json:"location"`
	Arch            string `json:"arch"`
}

type Provision

type Provision struct {
	Nodes        []string       `json:"nodes"`
	ImageName    string         `json:"image_name"`
	Memory       int            `json:"ram"`
	Hours        int            `json:"hours"`
	PortBindings map[string]int `json:"port_bindings"`
	UserID       string         `json:"user_id,omitempty"`
	AuctionID    string         `json:"auction_id,omitempty"`
}

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc contextHandler
}

type Routes

type Routes []Route

type User

type User struct {
	Name    string `json:"name,omitempty"`
	ID      string `json:"id,omitempty"`
	Balance int    `json:"balance,omitempty"`
}

Jump to

Keyboard shortcuts

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