types

package
v0.0.0-...-3dd6856 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigResponse

type ConfigResponse struct {
	LastChange int64                `json:"last_change"`
	Configs    []integration.Config `json:"configs"`
}

ConfigResponse holds the DCA response for a config query

type EndpointsInfo

type EndpointsInfo struct {
	Namespace     string
	Name          string
	ServiceEntity string
	Configs       []integration.Config
}

EndpointsInfo is used to store the collected info of endpoints.

type LeaderIPCallback

type LeaderIPCallback func() (string, error)

LeaderIPCallback describes the leader-election method we need and allows to inject a custom one for tests

type NodeStatus

type NodeStatus struct {
	LastChange int64 `json:"last_change"`
}

NodeStatus holds the status report from the node-agent

type StateNodeResponse

type StateNodeResponse struct {
	Name    string               `json:"name"`
	Configs []integration.Config `json:"configs"`
}

StateNodeResponse is a chunk of StateResponse

type StateResponse

type StateResponse struct {
	NotRunning string               `json:"not_running"` // Reason why not running, empty if leading
	Warmup     bool                 `json:"warmup"`
	Nodes      []StateNodeResponse  `json:"nodes"`
	Dangling   []integration.Config `json:"dangling"`
}

StateResponse holds the DCA response for a dispatching state query

type Stats

type Stats struct {
	// Following
	Follower bool
	LeaderIP string

	// Leading
	Leader          bool
	Active          bool
	NodeCount       int
	ActiveConfigs   int
	DanglingConfigs int
	TotalConfigs    int
}

Stats holds statistics for the agent status command

type StatusResponse

type StatusResponse struct {
	IsUpToDate bool `json:"isuptodate"`
}

StatusResponse holds the DCA response for a status report

Jump to

Keyboard shortcuts

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