sources

package
v0.0.0-...-ddaee32 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2015 License: Apache-2.0 Imports: 17 Imported by: 2

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 DmrAttributeRequest

type DmrAttributeRequest struct {
	Operation string `json:"operation"`
	Name      string `json:"name"`
	Pretty    int    `json:"json.pretty"`
}

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 DmrResourceRequest

type DmrResourceRequest struct {
	Operation      string   `json:"operation"`
	IncludeRuntime bool     `json:"include-runtime"`
	Address        []string `json:"address"`
	Pretty         int      `json:"json.pretty"`
}

type DmrResponse

type DmrResponse struct {
	Outcome            string      `json:"outcome"`
	Result             interface{} `json:"result"`
	FailureDescription string      `json:"failure-description"`
	RolledBacked       bool        `json:"rolled-back"`
}

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{}

type StringInt

type StringInt struct {
	Value int
}

func (StringInt) MarshalJSON

func (strint StringInt) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface.

func (*StringInt) String

func (strint *StringInt) String() string

String returns the string value, or Itoa's the int value.

func (*StringInt) UnmarshalJSON

func (strint *StringInt) UnmarshalJSON(value []byte) error

UnmarshalJSON implements the json.Unmarshaller interface.

type WebResult

type WebResult struct {
	BytesReceived   StringInt `json:"bytesReceived"`
	BytesSent       StringInt `json:"bytesSent"`
	EnableLookups   bool      `json:"enable-lookups"`
	Enabled         bool      `json:"enabled"`
	ErrorCount      StringInt `json:"errorCount"`
	Executor        string    `json:"executor"`
	MaxConnections  int       `json:"max-connections"`
	MaxPostSize     int64     `json:"max-post-size"`
	MaxSavePostSize int64     `json:"max-save-post-size"`
	MaxTime         StringInt `json:"maxTime"`
	Name            string    `json:"name"`
	ProcessingTime  StringInt `json:"processingTime"`
	Protocol        string    `json:"protocol"`
	ProxyName       string    `json:"proxy-name"`
	ProxyPort       string    `json:"proxy-port"`
	RedirectPort    int       `json:"redirect-port"`
	RequestCount    StringInt `json:"requestCount"`
	Scheme          string    `json:"scheme"`
	Secure          bool      `json:"secure"`
	SocketBinding   string    `json:"socket-binding"`
	SSL             string    `json:"ssl"`
	VirtualServer   string    `json:"virtual-server"`
}

Jump to

Keyboard shortcuts

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