cache

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir returns the directory where k0sctl temporary files should be stored. The directory will be created if it does not exist.

func EnsureDir

func EnsureDir(dir string) error

EnsureDir makes a directory if it doesn't exist

func File

func File(parts ...string) string

File returns a path to a file in the cache dir

func GetFile

func GetFile(parts ...string) (string, error)

GetFile returns a file from the cache directory if it exists

func GetOrCreate

func GetOrCreate(create func(string) error, parts ...string) (string, error)

GetOrCreate generates a path and runs the provided function if the file does not exist

Types

This section is empty.

Jump to

Keyboard shortcuts

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