diskusage

package
v0.0.0-...-3793e92 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package diskusage grabs pod disk usage from k8s

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerDiskUsage

type ContainerDiskUsage struct {
	Name   string    `json:"name"`
	RootFS DiskUsage `json:"rootfs"`
	Logs   DiskUsage `json:"logs"`
}

type DiskUsage

type DiskUsage struct {
	UsedBytes int64 `json:"usedBytes"`
}

type Fetcher

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

func NewFetcher

func NewFetcher(nodeCache *cache.Expiring, nodeCacheTTL time.Duration, podGetter PodGetter, nodeStatter NodeStatter) *Fetcher

func (*Fetcher) DiskUsage

func (f *Fetcher) DiskUsage(podName string) (int64, error)

type NodeDiskUsage

type NodeDiskUsage struct {
	Pods []PodDiskUsage `json:"pods"`
}

type NodeStatter

type NodeStatter interface {
	Summary(nodeName string) (NodeDiskUsage, error)
}

func NewNodeStatter

func NewNodeStatter(k8sRestClient rest.Interface) NodeStatter

type PodDiskUsage

type PodDiskUsage struct {
	PodRef     PodRef               `json:"podRef"`
	Containers []ContainerDiskUsage `json:"containers"`
}

type PodGetter

type PodGetter interface {
	Get(podName string) (*v1.Pod, error)
}

func NewPodGetter

func NewPodGetter(podsClient typesv1.PodInterface) PodGetter

type PodRef

type PodRef struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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