artifact

package
Version: v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages artifacts

func NewManager

func NewManager(artifactHomeDir ...string) *Manager

NewManager Initiates a artifacts manager. If artifactHomeDir not passed, the default '/var/lib/cyclone' will be used.

func (*Manager) CleanPeriodically

func (m *Manager) CleanPeriodically(retention time.Duration)

CleanPeriodically will clean up artifacts which exceeded retention time periodically. This func will run forever unless panics, you'd better invoke it by a go-routine.

func (*Manager) GetDiskAvailablePercentage

func (m *Manager) GetDiskAvailablePercentage() (float64, error)

GetDiskAvailablePercentage returns available space in percentage format of the artifact home folder.

Source Files

Jump to

Keyboard shortcuts

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