cache

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateAll

func UpdateAll(ds store.DataStore) error

UpdateAll refreshes all caches using the provided DataStore. The caller is responsible for the DataStore lifecycle (closing, etc.).

Types

type ExecutableCache

type ExecutableCache interface {
	Update() error
	GetExecutableByRef(ref executable.Ref) (*executable.Executable, error)
	GetExecutableList() (executable.ExecutableList, error)
}

func NewExecutableCache

func NewExecutableCache(wsCache WorkspaceCache, s store.DataStore) ExecutableCache

type ExecutableCacheData

type ExecutableCacheData struct {
	// Map of executable ref to config path
	ExecutableMap map[executable.Ref]string `json:"executableMap" yaml:"executableMap"`
	// Map of executable alias ref to primary executable ref
	AliasMap map[executable.Ref]executable.Ref `json:"aliasMap" yaml:"aliasMap"`
	// Map of config paths to their workspace / workspace path
	ConfigMap map[string]WorkspaceInfo `json:"configMap" yaml:"configMap"`
	// contains filtered or unexported fields
}

type ExecutableCacheImpl

type ExecutableCacheImpl struct {
	Data           *ExecutableCacheData `json:",inline" yaml:",inline"`
	WorkspaceCache WorkspaceCache       `json:"-"       yaml:"-"`
	Store          store.DataStore
}

func (*ExecutableCacheImpl) GetExecutableByRef

func (c *ExecutableCacheImpl) GetExecutableByRef(ref executable.Ref) (*executable.Executable, error)

func (*ExecutableCacheImpl) GetExecutableList

func (c *ExecutableCacheImpl) GetExecutableList() (executable.ExecutableList, error)

func (*ExecutableCacheImpl) Update

func (c *ExecutableCacheImpl) Update() error

type WorkspaceCache

type WorkspaceCache interface {
	Update() error
	GetData() *WorkspaceCacheData
	GetLatestData() (*WorkspaceCacheData, error)
	GetWorkspaceConfigList() (workspace.WorkspaceList, error)
}

func NewWorkspaceCache

func NewWorkspaceCache(s store.DataStore) WorkspaceCache

type WorkspaceCacheData

type WorkspaceCacheData struct {
	// Map of workspace name to workspace config
	Workspaces map[string]*workspace.Workspace `json:"workspaces" yaml:"workspaces"`
	// Map of workspace name to workspace path
	WorkspaceLocations map[string]string `json:"workspaceLocations" yaml:"workspaceLocations"`
}

type WorkspaceCacheImpl

type WorkspaceCacheImpl struct {
	Data  *WorkspaceCacheData
	Store store.DataStore
}

func (*WorkspaceCacheImpl) GetData

func (c *WorkspaceCacheImpl) GetData() *WorkspaceCacheData

func (*WorkspaceCacheImpl) GetLatestData

func (c *WorkspaceCacheImpl) GetLatestData() (*WorkspaceCacheData, error)

func (*WorkspaceCacheImpl) GetWorkspaceConfigList

func (c *WorkspaceCacheImpl) GetWorkspaceConfigList() (workspace.WorkspaceList, error)

func (*WorkspaceCacheImpl) Update

func (c *WorkspaceCacheImpl) Update() error

type WorkspaceInfo

type WorkspaceInfo struct {
	WorkspaceName string `json:"workspaceName" yaml:"workspaceName"`
	WorkspacePath string `json:"workspacePath" yaml:"workspacePath"`
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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