model

package
v0.0.0-...-e1dbaa0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalClusterID = GUID(uuid.Nil.String())
View Source
var Statuses = [...]string{
	"down",
	"up",
	"unknown",
}

Functions

This section is empty.

Types

type GUID

type GUID string

func NewGUID

func NewGUID() GUID

func (GUID) String

func (id GUID) String() string

type Host

type Host struct {
	ID             GUID   `redis:"id"`
	Name           string `redis:"name"`
	TotalMemSizeMB uint64 `redis:"total_mem_size_mb"`
	MemUsedMB      uint64 `redis:"mem_used_mb"`
}

func (*Host) MemUsage

func (host *Host) MemUsage() float32

type HostStats

type HostStats struct {
	ID             GUID   `redis:"id"`
	TotalMemSizeMB uint64 `redis:"total_mem_size_mb"`
	MemUsedMB      uint64 `redis:"mem_used_mb"`
}

func (*HostStats) RedisType

func (hs *HostStats) RedisType() string

type Status

type Status int8
const (
	Down Status = iota
	Up
	Unknown
)

type VM

type VM struct {
	ID        GUID   `redis:"id"`
	Name      string `redis:"name"`
	Status    Status `redis:"status"`
	MemSizeMB uint64 `redis:"mem_size_mb"`
}

func (*VM) RedisIndexes

func (vm *VM) RedisIndexes() map[string]string

Jump to

Keyboard shortcuts

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