file

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleansing added in v0.1.4

func Cleansing()

func DeleteByAge

func DeleteByAge(dryRun bool)

func DeleteBySize

func DeleteBySize(dryRun bool)

func DirSize added in v0.1.4

func DirSize(path string) (int64, error)

func GetDiskUsedKB

func GetDiskUsedKB() (int, error)

Types

type EventSearchParams

type EventSearchParams struct {
	Namespace string
	Type      string
	Reason    string
	Object    string
	Count     string
}

type LogDir

type LogDir struct {
	FullPath    string
	SubPath     string
	Typ         string
	Target      string
	FileCount   int
	FirstFile   string
	LastFile    string
	Size        int64
	LastForward string
}

func ListDirs

func ListDirs() []LogDir

func ListDirsWithSize

func ListDirsWithSize() []LogDir

func ListTargets

func ListTargets() []LogDir

type LogFile

type LogFile struct {
	FullPath  string
	SubPath   string
	Typ       string
	Target    string
	Name      string
	Extention string
	Size      int64
}

LogFile

func ListFiles

func ListFiles() []LogFile

func ListFilesWithSize

func ListFilesWithSize() []LogFile

type LogSearch

type LogSearch struct {
	LogType       string // audit | event | pod | node
	TargetPattern string // audit | event | <namespace_pattern> | <node_pattern>
	Targets       []string
	// AuditSearchParams AuditSearchParams
	EventSearchParams EventSearchParams
	PodSearchParams   PodSearchParams
	NodeSearchParams  NodeSearchParams
	Keywords          []string
	DurationSeconds   int
	EndTime           time.Time
	IsCounting        bool
}

type NodeSearchParams

type NodeSearchParams struct {
	NodePattern string
	Nodes       []string
	Process     string
}

type PodSearchParams

type PodSearchParams struct {
	NamespacePattern string
	Namespaces       []string
	Pod              string
	Container        string
}

type Result

type Result struct {
	IsCounting bool
	Logs       []string
	Count      int
}

func GetLogs

func GetLogs(logSearch LogSearch) (Result, error)

Jump to

Keyboard shortcuts

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