cache

package
v2.6.6-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFromUserCache

func DeleteFromUserCache(ctx context.Context, file string) error

func DeleteIngressesFromUserCache

func DeleteIngressesFromUserCache(ctx context.Context) error

DeleteIngressesFromUserCache removes the ingresses cache if exists or returns an error. An attempt to remove a non-existing cache is a no-op and the function returns nil.

func LoadFromUserCache

func LoadFromUserCache(ctx context.Context, dest any, file string) error

func LoadIngressesFromUserCache

func LoadIngressesFromUserCache(ctx context.Context) (map[string]*manager.IngressInfo, error)

LoadIngressesFromUserCache gets the ingresses from cache. An empty map is returned if the file does not exist. An error is returned if something goes wrong while loading or unmarshalling.

func SaveIngressesToUserCache

func SaveIngressesToUserCache(ctx context.Context, ingresses map[string]*manager.IngressInfo) error

SaveIngressesToUserCache saves the provided ingresses to user cache and returns an error if something goes wrong while marshalling or persisting.

func SaveToUserCache

func SaveToUserCache(ctx context.Context, object any, file string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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