repo

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageFilesystemReport

type ImageFilesystemReport struct {
	Timestamp        time.Time
	Mountpoint       string `gorm:"primaryKey"`
	NodeID           uint   `gorm:"primaryKey"`
	UsedBytes        uint64
	InodesUsed       uint64
	ReportedAt       time.Time
	SeenInLastReport bool
}

type ImageReport

type ImageReport struct {
	ID                 string `gorm:"primaryKey"`
	RepoTag            string `gorm:"primaryKey"`
	RepoDigest         string `gorm:"primaryKey"`
	NodeID             uint   `gorm:"primaryKey"`
	Size               uint64
	Username           string
	Image              string
	Annotations        map[string]string `gorm:"serializer:json"`
	UserSpecifiedImage string
	Pinned             bool
	UID                int64
	ReportedAt         time.Time
	SeenInLastReport   bool
}

type Node

type Node struct {
	ID                uint   `gorm:"primarykey"`
	Podname           string `gorm:"index"`
	Nodename          string `gorm:"index"`
	LastSeen          time.Time
	AgentVersion      string
	KubeAPIVersion    string
	RuntimeName       string
	RuntimeVersion    string
	RuntimeAPIVersion string
	Images            []ImageReport
	ImageFilesystems  []ImageFilesystemReport
}

type Repo

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

func NewRepo

func NewRepo(file string, reportIntervalSecs, retentionDays uint16) (*Repo, error)

func (Repo) GetDigestsByNameAndAfter

func (r Repo) GetDigestsByNameAndAfter(name string, after time.Time) ([]string, error)

func (Repo) GetIDsByNameAndAfter

func (r Repo) GetIDsByNameAndAfter(name string, after time.Time) ([]string, error)

func (Repo) GetReportForNode

func (r Repo) GetReportForNode(node string, all bool) ([]Node, error)

func (Repo) RunStaleRecordsCleaner

func (r Repo) RunStaleRecordsCleaner()

func (Repo) StopStaleRecordsCleaner

func (r Repo) StopStaleRecordsCleaner()

func (Repo) StoreReport

func (r Repo) StoreReport(node *Node, fsUsage []ImageFilesystemReport, images []ImageReport) error

type RepoOpts

type RepoOpts struct {
	ReportInterval  time.Duration
	Retention       time.Duration
	NodeRetention   time.Duration
	CleanerInterval time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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