backend

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

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)

	// StateStorage returns the state storage.
	StateStorage(project, workspace string) state.Storage
}

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