runtime

package
v2017.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSHUpdateHostname   = "" /* 299-byte string literal not displayed */
	SSHUpdateOwner      = "uci set gluon-node-info.@owner[0].contact='%s';uci commit gluon-node-info;"
	SSHUpdateLocation   = "" /* 184-byte string literal not displayed */
	SSHUpdateWifiFreq24 = "" /* 295-byte string literal not displayed */
	SSHUpdateWifiFreq5  = "" /* 295-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	ssh.List
	Timestemp time.Time `json:"timestemp"`
	ID        string    `json:"id"`
}

func (*Command) Run

func (cmd *Command) Run(f func())

type Commands

type Commands struct {
	List map[string]*Command
	// contains filtered or unexported fields
}

func NewCommands

func NewCommands(mgmt *ssh.Manager) *Commands

func (*Commands) AddCommand

func (cmds *Commands) AddCommand(c *Command) *Command

type Node

type Node struct {
	Lastseen jsontime.Time `json:"lastseen"`
	NodeID   string        `json:"node_id"`
	Hostname string        `json:"hostname"`
	Location data.Location `json:"location"`
	Wireless data.Wireless `json:"wireless"`
	Owner    string        `json:"owner"`
	Address  net.IP        `json:"-"`
	Stats    struct {
		Wireless data.WirelessStatistics `json:"wireless"`
		Clients  data.Clients            `json:"clients"`
	} `json:"statistics"`
}

func NewNode

func NewNode(nodeOrigin *yanicRuntime.Node) *Node

func (*Node) GetAddress

func (n *Node) GetAddress(iface string) net.TCPAddr

func (*Node) IsEqual

func (n *Node) IsEqual(node *Node) bool

func (*Node) SSHUpdate

func (n *Node) SSHUpdate(ssh *ssh.Manager, iface string, oldnode *Node)

func (*Node) Update

func (n *Node) Update(node *yanicRuntime.Node)

type Nodes

type Nodes struct {
	List    map[string]*Node `json:"nodes"`
	Current map[string]*Node `json:"-"`

	sync.Mutex
	// contains filtered or unexported fields
}

func NewNodes

func NewNodes(path string, iface string, mgmt *ssh.Manager) *Nodes

func (*Nodes) AddNotify

func (nodes *Nodes) AddNotify(f func(*Node, bool))

func (*Nodes) LearnNode

func (nodes *Nodes) LearnNode(n *yanic.Node)

func (*Nodes) Saver

func (nodes *Nodes) Saver()

func (*Nodes) UpdateNode

func (nodes *Nodes) UpdateNode(node *Node)

func (*Nodes) Updater

func (nodes *Nodes) Updater()

Jump to

Keyboard shortcuts

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