workspaces

package
v0.1.23-oss Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirDiff

func DirDiff(ctx context.Context, store entities.CASStore, a, b entities.Hash) <-chan DiffActionErr

func ReadStatus

func ReadStatus(root string) (binding.WorkspaceStatus, error)

func SetupEmptyGitRepos

func SetupEmptyGitRepos(casfs bindcas.CASFS, root, workDir, gitDir, objectsDir string) error

Types

type ActiveWS

type ActiveWS struct {
	Name string
	Path string
	// contains filtered or unexported fields
}

func NewActive

func NewActive(wsName, path string, wsSnap *binding.WSSnapshot, ws *Workspaces, mntDaemon binding.MountDaemon, casfs bindcas.CASFS) *ActiveWS

func (*ActiveWS) GetStatus

func (m *ActiveWS) GetStatus() *binding.WorkspaceStatus

func (*ActiveWS) PutWSSnapshot

func (m *ActiveWS) PutWSSnapshot(ctx context.Context, wsSnap *binding.WSSnapshot, prevHash entities.Hash) error

func (*ActiveWS) RemoveStatusFile

func (m *ActiveWS) RemoveStatusFile()

func (*ActiveWS) Stop

func (m *ActiveWS) Stop()

func (*ActiveWS) Sync

func (m *ActiveWS) Sync(ctx context.Context)

func (*ActiveWS) WriteStatus

func (m *ActiveWS) WriteStatus() error

type DiffAction

type DiffAction struct {
	Path  string
	HashA entities.Hash
	ModeA entities.FileMode
	SizeA int64
	HashB entities.Hash
	ModeB entities.FileMode
	SizeB int64
}

type DiffActionErr

type DiffActionErr = struct {
	DiffAction
	Err error
}

type SnapDiff

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

func (SnapDiff) Count

func (d SnapDiff) Count() int64

type Workspaces

type Workspaces struct {
	User     string
	Store    entities.CASStore
	Cacheman *client.Client
}

func NewWorkspaces

func NewWorkspaces(store entities.CASStore, cacheman *client.Client) *Workspaces

func (*Workspaces) Clone

func (s *Workspaces) Clone(name string, newWS string) error

func (*Workspaces) FetchSnapshotByHash

func (s *Workspaces) FetchSnapshotByHash(ctx context.Context, hash entities.Hash) (*binding.WSSnapshot, error)

func (*Workspaces) FetchWSSnapshot

func (s *Workspaces) FetchWSSnapshot(ctx context.Context, wsName string) (*binding.WSSnapshot, error)

func (*Workspaces) List

func (s *Workspaces) List() (map[string]entities.Hash, error)

func (*Workspaces) PutSnapshotHash

func (s *Workspaces) PutSnapshotHash(wsName string, hash, prevHash entities.Hash) error

func (*Workspaces) PutWSSnapshot

func (s *Workspaces) PutWSSnapshot(ctx context.Context, wsName string, wsSnap *binding.WSSnapshot, prevHash entities.Hash) error

func (*Workspaces) Remove

func (s *Workspaces) Remove(wsName string, prevHash entities.Hash) error

func (*Workspaces) Resolve

func (s *Workspaces) Resolve(paths []string) error

func (*Workspaces) SnapshotHash

func (s *Workspaces) SnapshotHash(wsName string) (entities.Hash, error)

func (*Workspaces) StatusFromPath

func (s *Workspaces) StatusFromPath(path string) (binding.WorkspaceStatus, error)

Jump to

Keyboard shortcuts

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