cache

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = 2

Variables

View Source
var ErrCacheExpired = fmt.Errorf("cache record expired")
View Source
var ErrCacheIncompatible = fmt.Errorf("cache record used incomatible schema")
View Source
var ErrCacheNotFound = fmt.Errorf("cache record not found")

Functions

This section is empty.

Types

type Cache

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

func New

func New(cacheDir string, maxCacheAge time.Duration, accountID string, region string) *Cache

func (*Cache) AddServices

func (c *Cache) AddServices(state *state.State, includedServices []string) error

func (*Cache) ListServices

func (c *Cache) ListServices(required []string) (included []string, missing []string)

func (*Cache) LoadState

func (c *Cache) LoadState() (*state.State, error)

type CacheData

type CacheData struct {
	SchemaVersion int                        `json:"schema_version"`
	State         *state.State               `json:"state"`
	Services      map[string]ServiceMetadata `json:"service_metadata"`
	Updated       time.Time                  `json:"updated"`
}

type ServiceMetadata

type ServiceMetadata struct {
	Name    string    `json:"name"`
	Updated time.Time `json:"updated"`
}

Jump to

Keyboard shortcuts

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