cache

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateAll

func UpdateAll(logger io.Logger) error

Types

type CacheUpdateError

type CacheUpdateError struct {
	Err error
}

func NewCacheUpdateError

func NewCacheUpdateError(err error) CacheUpdateError

func (CacheUpdateError) Error

func (e CacheUpdateError) Error() string

func (CacheUpdateError) Unwrap

func (e CacheUpdateError) Unwrap() error

type ExecutableCache

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

func NewExecutableCache

func NewExecutableCache(wsCache WorkspaceCache) 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:"-"`
}

func (*ExecutableCacheImpl) GetExecutableByRef

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

func (*ExecutableCacheImpl) GetExecutableList

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

func (*ExecutableCacheImpl) Update

func (c *ExecutableCacheImpl) Update(logger io.Logger) error

type ExecutableNotFoundError

type ExecutableNotFoundError struct {
	Ref string
}

func NewExecutableNotFoundError

func NewExecutableNotFoundError(ref string) ExecutableNotFoundError

func (ExecutableNotFoundError) Error

func (e ExecutableNotFoundError) Error() string

func (ExecutableNotFoundError) Unwrap

func (e ExecutableNotFoundError) Unwrap() error

type WorkspaceCache

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

func NewWorkspaceCache

func NewWorkspaceCache() WorkspaceCache

type WorkspaceCacheData

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

type WorkspaceCacheImpl

type WorkspaceCacheImpl struct {
	Data *WorkspaceCacheData
}

func (*WorkspaceCacheImpl) GetData

func (c *WorkspaceCacheImpl) GetData() *WorkspaceCacheData

func (*WorkspaceCacheImpl) GetLatestData

func (c *WorkspaceCacheImpl) GetLatestData(logger io.Logger) (*WorkspaceCacheData, error)

func (*WorkspaceCacheImpl) GetWorkspaceConfigList

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

func (*WorkspaceCacheImpl) Update

func (c *WorkspaceCacheImpl) Update(logger io.Logger) 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