v1

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const AgentResourcePlural = "agents"

AgentResourcePlural is a constant for plural form naming

View Source
const GroupName = "network-checker.ext"

GroupName is the group name use in this package

Variables

View Source
var (
	// SchemeBuilder is an instance of schema constructor
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a method for runtime
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Agent

type Agent struct {
	meta_v1.TypeMeta   `json:",inline"`
	meta_v1.ObjectMeta `json:"metadata"`
	Spec               AgentSpec `json:"spec"`
}

Agent struct to store AgentSpec info as json

type AgentList

type AgentList struct {
	meta_v1.TypeMeta `json:",inline"`
	meta_v1.ListMeta `json:"metadata"`
	Items            []Agent `json:"items"`
}

AgentList struct to store many of agents

type AgentSpec

type AgentSpec struct {
	ReportInterval int                 `json:"report_interval"`
	NodeName       string              `json:"nodename"`
	PodName        string              `json:"podname"`
	HostDate       time.Time           `json:"hostdate"`
	Uptime         uint64              `json:"uptime"`
	LastUpdated    time.Time           `json:"last_updated"`
	LookupHost     map[string][]string `json:"nslookup"`
	NetworkProbes  []ProbeResult       `json:"network_probes"`
	IPs            map[string][]string `json:"ips"`
}

AgentSpec is a payload to keep Agent info

type ProbeResult

type ProbeResult struct {
	URL              string
	ConnectionResult int
	HTTPCode         int
	Total            int
	ContentTransfer  int
	TCPConnection    int
	DNSLookup        int
	Connect          int
	ServerProcessing int
}

ProbeResult structure for network probing results

Jump to

Keyboard shortcuts

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