model

package
v0.0.0-...-35ec728 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RED    = 0
	YELLOW = 1
	GREEN  = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeStatus

type NodeStatus struct {
	NodeID int `json:"nid"`
	State  int `json:"state"`
}

type Status

type Status struct {
	State       int       `json:"state"`
	Work        bool      `json:"work"`
	Count       int       `json:"count"`
	LastConnect time.Time `json:"last_connect"`
}

func NewStatus

func NewStatus(work bool, t time.Time) Status

func (*Status) CheckDrop

func (s *Status) CheckDrop() bool

func (*Status) UpdateState

func (s *Status) UpdateState(work bool, t time.Time) bool

Jump to

Keyboard shortcuts

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