state

package
v0.0.0-...-76e78dc Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var State = MasterState{
	PluginVersion:  "",
	ConfigVersions: make(map[string]int64),
	Agents:         make(map[string]AgentInfo),
	PluginDirs:     make(map[string][]string),
	Plugin:         make(map[string][]model.PluginParam),
}
View Source
var StateLock = new(sync.RWMutex)

Functions

func Start

func Start()

Types

type AgentInfo

type AgentInfo struct {
	Hostname      string `json:"hostname"`
	IP            string `json:"ip"`
	AgentVersion  string `json:"agent-version"`
	PluginVersion string `json:"plugin-version"`
	LastSeen      int64  `json:"lastseen"`
}

type MasterState

type MasterState struct {
	PluginVersion  string                         `json:"plugin-version"`
	ConfigVersions map[string]int64               `json:"config-version"`
	Agents         map[string]AgentInfo           `json:"agents"`
	PluginDirs     map[string][]string            `json:"plugin-dirs"`
	Plugin         map[string][]model.PluginParam `json:"plugins"`
}

type MsgType

type MsgType struct {
	Type string `json:"type"`
}

type PluginDirInfo

type PluginDirInfo struct {
	// type = plugin-dir
	Hostname string   `json:"hostname"`
	Dirs     []string `json:"dirs"`
}

Hear these from Riemann

type PluginInfo

type PluginInfo struct {
	// type = plugin
	Hostname string              `json:"hostname"`
	Params   []model.PluginParam `json:"plugins"`
}

type PluginVersionInfo

type PluginVersionInfo struct {
	// type = plugin-version
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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