nodeinfo

package
v0.0.0-...-d3ca24b Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2015 License: BSD-3-Clause Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseConnection

func CloseConnection(deadHost string)

func GetNodes

func GetNodes() []utils.NodeTable

func Initialize

func Initialize()

func SetAlive

func SetAlive() bool

func UpdateConnection

func UpdateConnection() bool

Types

type MySQLNodeDB

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

func (*MySQLNodeDB) Close

func (my *MySQLNodeDB) Close(deadHost string)

call this method when you want to close the connection

func (*MySQLNodeDB) CreateDB

func (my *MySQLNodeDB) CreateDB()

func (*MySQLNodeDB) GetAll

func (my *MySQLNodeDB) GetAll() []utils.NodeTable

func (*MySQLNodeDB) Insert

func (my *MySQLNodeDB) Insert() bool

func (*MySQLNodeDB) Update

func (my *MySQLNodeDB) Update() bool

type NodeStore

type NodeStore interface {
	Insert() bool
	GetAll() []utils.NodeTable
	CreateDB()
	Update() bool
	Close(deadHost string) // call this method when you want to close the connection
	// contains filtered or unexported methods
}

type NodeTable

type NodeTable struct {
	Id         int       `db:"id"`
	HostName   string    `db:"hostname"`
	NodeIPs    string    `db:"host_ips"`
	Connected  time.Time `db:"connected_on"`
	LastUpdate time.Time `db:"last_update"`
}

Jump to

Keyboard shortcuts

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