raw

package
v0.0.0-...-58fdc68 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentMeasurement       = "agent-measurement"
	Namespaces             = "namespaces"
	Pods                   = "pods"
	Deployments            = "deployments"
	ReplicaSets            = "replicasets"
	ReplicationControllers = "replicationcontrollers"
	DaemonSets             = "daemonsets"
	Services               = "services"
	Jobs                   = "jobs"
	Nodes                  = "nodes"
	PersistentVolumes      = "persistentvolumes"
	PersistentVolumeClaims = "persistentvolumeclaims"
)
View Source
const (
	KubernetesLastAppliedConfig = "kubectl.kubernetes.io/last-applied-configuration"
)

Variables

View Source
var ParsableFileSet = map[string]struct{}{
	AgentMeasurement:       {},
	Namespaces:             {},
	Pods:                   {},
	Deployments:            {},
	ReplicaSets:            {},
	ReplicationControllers: {},
	DaemonSets:             {},
	Services:               {},
	Jobs:                   {},
	Nodes:                  {},
	PersistentVolumes:      {},
	PersistentVolumeClaims: {},
}

ParsableFileSet contains file names that can be minimized via de/re serialization

Functions

This section is empty.

Types

type CldyAgent

type CldyAgent struct {
	Name      string            `json:"name,omitempty"`
	Metrics   map[string]uint64 `json:"metrics,omitempty"`
	Tags      map[string]string `json:"tags,omitempty"`
	Timestamp int64             `json:"ts,omitempty"`
	Value     float64           `json:"value,omitempty"`
	Values    map[string]string `json:"values,omitempty"`
}

CldyAgent has information from the agent JSON file.

type Client

type Client struct {
	HTTPClient *http.Client

	BearerToken     string
	BearerTokenPath string
	// contains filtered or unexported fields
}

Client defines an HTTP Client

func NewClient

func NewClient(HTTPClient http.Client, insecure bool, bearerToken, bearerTokenPath string, retries uint,
	parseMetricData bool) Client

NewClient creates a new raw.Client

func (*Client) GetRawEndPoint

func (c *Client) GetRawEndPoint(method, sourceName string,
	workDir *os.File, URL string, body []byte, verbose bool) (filename string, err error)

GetRawEndPoint retrives the body of HTTP response from a given method , sourcename, working directory, URL, and request body

type LabelMapMatchedResource

type LabelMapMatchedResource struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              struct {
		LabelSelector map[string]string `json:"selector,omitempty"`
	} `json:"spec,omitempty"`
	Status struct {
		LoadBalancer LoadBalancer `json:"loadBalancer"`
	}
}

LabelMapMatchedResource is a k8s resource that "points" to a pod by a label map. This struct gathers the minimal necessary fields for adding the relevant labels to the heapster metric.

type LabelMapMatchedResourceList

type LabelMapMatchedResourceList struct {
	ListResponse
	Items []LabelMapMatchedResource `json:"items"`
}

LabelMapMatchedResourceList is a slice of LabelMapMatchedResource, one for each entry in the json.

type LabelSelectorMatchedResource

type LabelSelectorMatchedResource struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              struct {
		LabelSelector metav1.LabelSelector `json:"selector,omitempty"`
	} `json:"spec,omitempty"`
}

LabelSelectorMatchedResource is a k8s resource that "points" to a pod by a label selector. This struct gathers the minimal necessary fields for adding the relevant labels to the heapster metric.

type LabelSelectorMatchedResourceList

type LabelSelectorMatchedResourceList struct {
	ListResponse
	Items []LabelSelectorMatchedResource `json:"items"`
}

LabelSelectorMatchedResourceList is a slice of LabelSelectorMatchedResource, one for each entry in the json.

type ListResponse

type ListResponse struct {
	APIVersion string            `json:"apiVersion"`
	Kind       string            `json:"kind"`
	Metadata   map[string]string `json:"metadata"`
	Code       int               `json:"code"`
	Details    map[string]string `json:"details"`
	Message    string            `json:"message"`
	Reason     string            `json:"reason"`
	Status     string            `json:"status"`
}

ListResponse is a base object for unmarshaling k8s objects from the JSON files containing them. It captures the general fields present on all the responses.

type LoadBalancer

type LoadBalancer struct {
	Ingress []struct {
		Hostname string `json:"hostname"`
	} `json:"ingress"`
}

LoadBalancer represents ingress for ELB resources

type NamespaceList

type NamespaceList struct {
	ListResponse
	Items []corev1.Namespace `json:"items"`
}

NamespaceList represents the list of namespaces unmarshalled from the namespaces api.

type NodeList

type NodeList struct {
	ListResponse
	Items []corev1.Node `json:"items"`
}

NodeList represents the list of nodes unmarshalled from the nodes api.

type PersistentVolumeClaimList

type PersistentVolumeClaimList struct {
	ListResponse
	Items []corev1.PersistentVolumeClaim `json:"items"`
}

PersistentVolumeClaimList represents the list of persistent volume claims unmarshalled from the persistent volume claims api.

type PersistentVolumeList

type PersistentVolumeList struct {
	ListResponse
	Items []corev1.PersistentVolume `json:"items"`
}

PersistentVolumeList represents the list of persistent volumes unmarshalled from the persistent volumes api.

type PodList

type PodList struct {
	ListResponse
	Items []corev1.Pod `json:"items"`
}

PodList represents the list of pods unmarshalled from the pods api.

Jump to

Keyboard shortcuts

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