xdg

package
v0.37.8 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base interface {
	CacheFile(relPath string) (string, error)
	ConfigFile(relPath string) (string, error)
	DataFile(relPath string) (string, error)
	StateFile(relPath string) (string, error)
	RuntimeFile(relPath string) (string, error)
}

func NewTiltDevBase

func NewTiltDevBase() Base

type CLIWorkspace added in v0.37.8

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

A directory for the on-disk state of a single Tilt CLI run, named for its CLIWorkspaceID.

func NewCLIWorkspace added in v0.37.8

func NewCLIWorkspace(base Base, filesystem afero.Fs, workspaceID CLIWorkspaceID) *CLIWorkspace

func ProvideCLIWorkspace added in v0.37.8

func ProvideCLIWorkspace(globalCtx context.Context, base Base, filesystem afero.Fs, workspaceID CLIWorkspaceID) (*CLIWorkspace, func())

func (*CLIWorkspace) Cleanup added in v0.37.8

func (w *CLIWorkspace) Cleanup(ctx context.Context)

Deletes this run's directory.

func (*CLIWorkspace) OpenFile added in v0.37.8

func (w *CLIWorkspace) OpenFile(ctx context.Context, relPath ...string) (string, afero.File, error)

Creates a file at relPath within this run's directory, along with any directories above it, and returns the file and its absolute path.

type CLIWorkspaceID added in v0.37.8

type CLIWorkspaceID string

Identifies the Tilt process that owns a piece of on-disk state, so that concurrent Tilt processes never write to, or clean up, each other's.

Identified by the web-port (for long-running commands that hold a port), or by the pid (for one-shot commands that don't hold a port).

func ProvideCLIWorkspaceID added in v0.37.8

func ProvideCLIWorkspaceID(subcommand model.TiltSubcommand, port model.WebPort) CLIWorkspaceID

type FakeBase

type FakeBase struct {
	Dir string
	FS  afero.Fs
}

func NewFakeBase added in v0.34.0

func NewFakeBase(p string, fs afero.Fs) *FakeBase

func (*FakeBase) CacheFile

func (b *FakeBase) CacheFile(relPath string) (string, error)

func (*FakeBase) ConfigFile

func (b *FakeBase) ConfigFile(relPath string) (string, error)

func (*FakeBase) DataFile

func (b *FakeBase) DataFile(relPath string) (string, error)

func (*FakeBase) RuntimeFile

func (b *FakeBase) RuntimeFile(relPath string) (string, error)

func (*FakeBase) StateFile

func (b *FakeBase) StateFile(relPath string) (string, error)

Jump to

Keyboard shortcuts

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