file

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByAge

func DeleteByAge(dryRun bool)

func DeleteBySize

func DeleteBySize(dryRun bool)

func GetDiskUsedKB

func GetDiskUsedKB() (int, error)

func ListDirs

func ListDirs() []string

Types

type EventSearchParams

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

type LogDir

type LogDir struct {
	Dirpath     string
	Typ         string
	Target      string
	CountFiles  int
	FirstFile   string
	LastFile    string
	KB          int
	LastForward string
}

func ListDirsWithSize

func ListDirsWithSize() []LogDir

func ListTargets

func ListTargets() []LogDir

type LogFile

type LogFile struct {
	Filepath  string
	Typ       string
	Target    string
	Name      string
	Extention string
	KB        int
}

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