nodelist

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(configuration map[string]interface{}) (output.Output, error)

Types

type Config

type Config map[string]interface{}

func (Config) Path

func (c Config) Path() string

type Node

type Node struct {
	ID       string    `json:"id"`
	Name     string    `json:"name"`
	Position *Position `json:"position,omitempty"`
	Status   struct {
		Online      bool          `json:"online"`
		LastContact jsontime.Time `json:"lastcontact"`
		Clients     uint32        `json:"clients"`
	} `json:"status"`
}

func NewNode

func NewNode(n *runtime.Node) (node *Node)

type NodeList

type NodeList struct {
	Version   string        `json:"version"`
	Timestamp jsontime.Time `json:"updated_at"` // Timestamp of the generation
	List      []*Node       `json:"nodes"`
}

NodeList rewritten after: https://github.com/ffnord/ffmap-backend/blob/c33ebf62f013e18bf71b5a38bd058847340db6b7/lib/nodelist.py

type Output

type Output struct {
	output.Output
	// contains filtered or unexported fields
}

func (*Output) Save

func (o *Output) Save(nodes *runtime.Nodes)

type Position

type Position struct {
	Lat  float64 `json:"lat"`
	Long float64 `json:"long"`
}

Jump to

Keyboard shortcuts

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