sources

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

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

Go to latest
Published: Feb 19, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AMQDefaultDomain string = "org.apache.activemq"
)

Variables

View Source
var (
	JVMRequest = JolokiaRequest{
		Type:      Read,
		MBean:     "java.lang:type=Memory",
		Attribute: []string{"HeapMemoryUsage", "NonHeapMemoryUsage"},
	}
)

Functions

func PostRequestAndGetValue

func PostRequestAndGetValue(client *http.Client, req *http.Request, value interface{}) error

Types

type Container

type Container interface {
	GetName() string
	GetStats() (*StatsEntry, error)
}

type ContainerData

type ContainerData struct {
	Pods []Pod
}

type DmrContainer

type DmrContainer struct {
	Name    string      `json:"name,omitempty"`
	Host    string      `json:"host"`
	DmrPort int         `json:"dmrPort"`
	Stats   *StatsEntry `json:"stats,omitempty"`
}

func (*DmrContainer) GetName

func (self *DmrContainer) GetName() string

func (*DmrContainer) GetStats

func (self *DmrContainer) GetStats() (*StatsEntry, error)

type Environment

type Environment interface {
	GetHost(pod *kube_api.Pod, port kube_api.Port) string
	GetPort(pod *kube_api.Pod, port kube_api.Port) int
}

type JolokiaContainer

type JolokiaContainer struct {
	Name        string      `json:"name,omitempty"`
	Host        string      `json:"host"`
	JolokiaPort int         `json:"jolokiaPort"`
	Stats       *StatsEntry `json:"stats,omitempty"`
}

func (*JolokiaContainer) GetName

func (self *JolokiaContainer) GetName() string

func (*JolokiaContainer) GetStats

func (self *JolokiaContainer) GetStats() (*StatsEntry, error)

type JolokiaRequest

type JolokiaRequest struct {
	Type      JolokiaRequestType `json:"type"`
	MBean     string             `json:"mbean,omitempty"`
	Attribute interface{}        `json:"attribute,omitempty"`
	Path      string             `json:"path,omitempty"`
	MaxDepth  uint               `json:"maxDepth,omitempty"`
}

func GetAMQRequests

func GetAMQRequests(url string) ([]JolokiaRequest, error)

type JolokiaRequestType

type JolokiaRequestType string
const (
	Search JolokiaRequestType = "search"
	Read   JolokiaRequestType = "read"
	List   JolokiaRequestType = "list"
	Exec   JolokiaRequestType = "exec"
	Write  JolokiaRequestType = "write"
)

type JolokiaResponse

type JolokiaResponse struct {
	Status    uint32
	Timestamp uint32
	Request   map[string]interface{}
	Value     StatsValue
	Error     string
}

type Jube

type Jube struct {
}

func (*Jube) GetHost

func (self *Jube) GetHost(pod *kube_api.Pod, port kube_api.Port) string

func (*Jube) GetPort

func (self *Jube) GetPort(pod *kube_api.Pod, port kube_api.Port) int

type KubeSource

type KubeSource struct {
	// contains filtered or unexported fields
}

func (*KubeSource) GetData

func (self *KubeSource) GetData() (ContainerData, error)

type Kubernetes

type Kubernetes struct {
}

func (*Kubernetes) GetHost

func (self *Kubernetes) GetHost(pod *kube_api.Pod, port kube_api.Port) string

func (*Kubernetes) GetPort

func (self *Kubernetes) GetPort(pod *kube_api.Pod, port kube_api.Port) int

type Pod

type Pod struct {
	Namespace  string            `json:"namespace,omitempty"`
	Name       string            `json:"name,omitempty"`
	ID         types.UID         `json:"id,omitempty"`
	Hostname   string            `json:"hostname,omitempty"`
	Containers []*Container      `json:"containers"`
	Status     string            `json:"status,omitempty"`
	PodIP      string            `json:"podIP,omitempty"`
	Labels     map[string]string `json:"labels,omitempty"`
}

PodState is the state of a pod, used as either input (desired state) or output (current state)

type Source

type Source interface {
	GetData() (ContainerData, error)
}

func NewSource

func NewSource() (Source, error)

type StatsEntry

type StatsEntry struct {
	// The time of this stat point.
	Timestamp time.Time             `json:"timestamp"`
	Stats     map[string]StatsValue `json:"stats,omitempty"`
}

type StatsValue

type StatsValue map[string]interface{}

Jump to

Keyboard shortcuts

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