backend

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWorkspaceStorage

func NewWorkspaceStorage(backendName string) (workspace.Storage, error)

NewWorkspaceStorage calls NewBackend and WorkspaceStorage to new a workspace storage from specified backend.

Types

type Backend

type Backend interface {
	// WorkspaceStorage returns the workspace storage and init default workspace.
	WorkspaceStorage() (workspace.Storage, error)

	// ReleaseStorage returns the release storage.
	ReleaseStorage(project, workspace string) (release.Storage, error)

	// StateStorageWithPath returns the state storage with the specified path.
	StateStorageWithPath(path string) (release.Storage, error)

	// GraphStorage returns the graph storage.
	GraphStorage(project, workspace string) (graph.Storage, error)

	// ProjectStorage returns the project directory under release folder.
	ProjectStorage() (map[string][]string, error)
}

Backend is used to provide the storage service for Workspace, Spec and State.

func NewBackend

func NewBackend(name string) (Backend, error)

NewBackend creates the Backend with the configuration set in the Kusion configuration file, where the input is the configured backend name. If the backend configuration is invalid, NewBackend will get failed. If the input name is empty, use the current backend. If no current backend is specified or backends config is empty, and the input name is empty, use the default local storage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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