node

package
Version: v0.0.0-...-043d1ac Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2017 License: AGPL-3.0-or-later, GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PublishChange

func PublishChange(db *database.Database) (err error)

Types

type BuilderSettings

type BuilderSettings struct {
	NodeId      string `bson:"_id" json:"-"`
	Concurrency int    `bson:"concurrency" json:"concurrency"`
}

type BuilderStats

type BuilderStats struct {
	Active int `bson:"active" json:"active"`
}

type Node

type Node struct {
	Id        string      `bson:"_id" json:"id"`
	Type      string      `bson:"type" json:"type"`
	Timestamp time.Time   `bson:"timestamp" json:"timestamp"`
	Memory    float64     `bson:"memory" json:"memory"`
	Load1     float64     `bson:"load1" json:"load1"`
	Load5     float64     `bson:"load5" json:"load5"`
	Load15    float64     `bson:"load15" json:"load15"`
	Stats     interface{} `bson:"stats" json:"stats"`
	Settings  interface{} `bson:"settings" json:"settings"`
}
var Self *Node

func Get

func Get(db *database.Database, nodeId string) (nde *Node, err error)

func GetAll

func GetAll(db *database.Database) (nodes []*Node, err error)

func (*Node) CommitSetttings

func (n *Node) CommitSetttings(db *database.Database) (err error)

func (*Node) Init

func (n *Node) Init() (err error)

func (*Node) LoadSettings

func (n *Node) LoadSettings(db *database.Database) (err error)

Jump to

Keyboard shortcuts

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