binding

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: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CtrlDir    = ".ctrl"
	TapCtrlDir = "tap"
)
View Source
const (
	CurrentDeepTreeRequestVersion                     = objects.CurrentDeepTreeRequestVersion
	ObjectTypeDeepTreeRequest     entities.ObjectType = objects.ObjectTypeDeepTreeRequest
	DeepTreeThreshold                                 = 1000
)
View Source
const (
	CurrentDigestMapRequestVersion                     = "0.1"
	ObjectTypeDigestMapRequest     entities.ObjectType = "digestmap-request"
)
View Source
const (
	CurrentDigestMapVersion                     = "0.1"
	ObjectTypeDigestMap     entities.ObjectType = "digestmap"

	DigestMapThreshold = 1000
)
View Source
const (
	CurrentPackFilesVersion = "0.2"
	ObjectTypePackFiles     = "pack-files"
)
View Source
const (
	ContentPrefetchPriority  = 0.3
	PrefetchSymlinksPriority = 0.3
)
View Source
const (
	CurrentProjectStatusVersion = "0.2"
	ObjectTypeProjectStatus     = "project-status"
)
View Source
const (
	CurrentWSSnapshotVersion                     = "0.1"
	ObjectTypeWSSnapshot     entities.ObjectType = "ws-snapshot"
)
View Source
const (
	CurrentIndexSnapObjectVersion                     = "0.1"
	ObjectTypeIndexSnapObject     entities.ObjectType = "index-snap-object"
)
View Source
const OldBuildResult01Version = "0.1"
View Source
const PacksRefs = "abfs/pushed-packs"
View Source
const ProjectStatusRef = "abfs/project-status"

Variables

View Source
var (
	ObjectJSONEncode = objects.ObjectJSONEncode
	ObjectJSONDecode = objects.ObjectJSONDecode
)
View Source
var EmptyIndexSnapObject = &IndexSnapObject{
	Version: CurrentIndexSnapObjectVersion,
}

Functions

func CreateDeepTree

func CreateDeepTree(tree entities.Hash, store entities.CASStore) (*gitobjects.DeepTreeObject, error)

func DeepTreeForTree

func DeepTreeForTree(ctx context.Context, tree entities.Hash, store entities.CASStore) (*gitobjects.DeepTreeObject, error)

func DiffRunInfo

func DiffRunInfo(out io.Writer, r1, r2 *EvalResponse)

func FetchMultiObject

func FetchMultiObject[T any](ctx context.Context, store entities.CASStore, hashes []entities.Hash) ([]*T, error)

func FetchObject

func FetchObject[T any](ctx context.Context, store entities.CASStore, hash Hash) (*T, error)

func FetchObjectWarnOnRetry

func FetchObjectWarnOnRetry[T any](ctx context.Context, store entities.CASStore, h entities.Hash, timeout time.Duration) (*T, error)

func FetchObjectWithRetry

func FetchObjectWithRetry[T any](ctx context.Context, store entities.CASStore, h entities.Hash, timeout time.Duration) (obj *T, err error)

func FindRootForSocket

func FindRootForSocket(root, socketName string) (string, error)

func GetDigestMapResult

func GetDigestMapResult(ctx context.Context, store entities.CASStore, tree entities.Hash) (entities.Hash, error)

func IsMatchError

func IsMatchError(err error) bool

func NewDeepTreeRequest

func NewDeepTreeRequest(tree entities.Hash, store entities.CASStore) *maps.MapRequest

func PrefetchDirs

func PrefetchDirs(dirPatterns []string, cacheman *client.Client, priority float64) error

func PrefetchInputPatch

func PrefetchInputPatch(p entities.Patch, cacheman *client.Client) error
func PrefetchSymlinks(ctx context.Context, deepTree *gitobjects.DeepTreeObject, store entities.CASStore, cacheman *client.Client) error

func ProcessResp

func ProcessResp(e EvalPostProcess)

ProcessResp strips any chroot prefix off of the eval response paths and labels the inputs and outputs with the appropriate expected vs. unexpected labels.

func PutDeepTree

func PutDeepTree(ctx context.Context, entries []*entities.DeepEntry, store entities.CASStore) (entities.Hash, error)

func TransformReadPatchEntry

func TransformReadPatchEntry(p *entities.PatchEntry, revalidate bool) *entities.PatchEntry

func UnpackDeepTree

func UnpackDeepTree(ctx context.Context, deeptree *gitobjects.DeepTreeObject, store entities.CASStore) (int64, int64, error)

Types

type BuildHash

type BuildHash struct {
	BuildStart Hash
	BuildInfo  Hash
}

type BuildInfo

type BuildInfo struct {
	JSONBaseObject
	Version string
	BuildStartData
	BuildStart    string
	RootEnd       string
	End           time.Time
	Error         string
	NinjaLog      string
	WrapLog       string
	CmdMapLog     string
	MismatchesLog string
	NinjaRunInfo  []NinjaRunInfo
}

func (*BuildInfo) Decode

func (e *BuildInfo) Decode(hash Hash, content []byte) error

func (*BuildInfo) Encode

func (e *BuildInfo) Encode() error
func (e *BuildInfo) Links() []Hash

type BuildRequest

type BuildRequest struct {
	JSONBaseObject
	Version            string
	RequestCtx         BuildRequestCtx
	RefPrefix          string
	PinnedManifestHash Hash
	BuildCommand       string
	NSJailBuild        NSJailBuild
}

func (*BuildRequest) Decode

func (e *BuildRequest) Decode(hash Hash, content []byte) error

func (*BuildRequest) Encode

func (e *BuildRequest) Encode() error
func (e *BuildRequest) Links() []Hash

type BuildRequestCtx

type BuildRequestCtx struct {
	RequestTime      time.Time
	RequestTimestamp int64
	UserName         string
	HostName         string
}

type BuildResult

type BuildResult struct {
	JSONBaseObject
	Version        string
	BuildRequest   Hash
	MountDetails   Hash
	BuildHashes    []BuildHash
	UnmountDetails Hash
	// UploadSecs is how long it took the cache to upload everything after the build completed, or the timeout value if waiting timed out
	UploadSecs float64
	Err        string
}

func (*BuildResult) Decode

func (e *BuildResult) Decode(hash Hash, content []byte) error

func (*BuildResult) Encode

func (e *BuildResult) Encode() error
func (e *BuildResult) Links() []Hash

type BuildStart

type BuildStart struct {
	JSONBaseObject
	Version string
	BuildStartData
}

func ReadBuildStart

func ReadBuildStart(chroot, outDir string) (bs *BuildStart, retErr error)

func (*BuildStart) Decode

func (e *BuildStart) Decode(hash Hash, content []byte) error

func (*BuildStart) Encode

func (e *BuildStart) Encode() error
func (e *BuildStart) Links() []Hash

type BuildStartData

type BuildStartData struct {
	BuildID       string
	MountDetails  string
	RootBegin     string
	Start         time.Time
	PreviousBuild string
	OutDir        string
	BuildCommand  []string
}

BuildStartData is embedded in the BuildStart and BuildInfo objects. The reason that BuildStartData needed to be extracted out was that both BuildStart and BuildInfo implement JSONBaseObject and it is better to not to hide methods like Encode() or Links().

type ChrootRequest

type ChrootRequest struct {
	Overlays []string `json:"overlays"`
	Views    []string `json:"views"`
}

type Client

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

func NewClient

func NewClient(rootDir, socketName string, cacheDir string, localOnly bool, fetchTimeout time.Duration) (*Client, error)

func (*Client) AddDigestMapEntries

func (c *Client) AddDigestMapEntries(ctx context.Context, entries []DigestEntry) error

func (*Client) AddGitRepo

func (c *Client) AddGitRepo(workDir, gitDir, objectsDir string, treeHash entities.Hash) error

func (*Client) ApplyPatch

func (c *Client) ApplyPatch(match, patch entities.Patch, deletes entities.DeletePatch, chroot string) error

func (*Client) Chroot

func (c *Client) Chroot(chroot string, overlays, views []string) error

func (*Client) Clone

func (c *Client) Clone(commit, path string) error

func (*Client) Close

func (c *Client) Close() error

func (*Client) Execute

func (c *Client) Execute(evalReq entities.Hash, patches []entities.Hash, storeMapResult, prefetchInputs bool) (resp entities.Hash, err error)

func (*Client) ExecuteSupport

func (c *Client) ExecuteSupport() (bool, error)

func (*Client) FetchHashStats

func (c *Client) FetchHashStats(chroot string, paths []string) ([]entities.HashStat, error)

func (*Client) FetchHashes

func (c *Client) FetchHashes(chroot string, paths []string) ([]entities.Hash, error)

func (*Client) GetWS

func (c *Client) GetWS() (*WorkspaceStatus, error)

func (*Client) LoadTreeDigestMap

func (c *Client) LoadTreeDigestMap(ctx context.Context, tree entities.Hash) error

func (*Client) MountDetails

func (c *Client) MountDetails() (*MountDetails, error)

func (*Client) ProviderPing

func (c *Client) ProviderPing() error

func (*Client) PutWS

func (c *Client) PutWS(ws string, isNew bool, strategy PutStrategy) error

func (*Client) RemoveWS

func (c *Client) RemoveWS() error

func (*Client) RestoreSnapshot

func (c *Client) RestoreSnapshot(ctx context.Context, snap Snapshot) error

func (*Client) Root

func (c *Client) Root() string

func (*Client) Snapshot

func (c *Client) Snapshot(ctx context.Context) (Snapshot, error)

func (*Client) Store

func (c *Client) Store() entities.CASStore

func (*Client) StoreEnvVars

func (c *Client) StoreEnvVars(envVars map[string]string) (Hash, error)

func (*Client) UseMany

func (c *Client) UseMany(hashes []entities.Hash) error

func (*Client) WaitFor

func (c *Client) WaitFor(timeout time.Duration, priority float64, objects []entities.Hash) error

WaitFor will block until all objects are successfully uploaded to remote, so callers should have their own timeout.

type DeepTreeRequest

type DeepTreeRequest = objects.DeepTreeRequest

type DigestEntry

type DigestEntry struct {
	Hash   Hash
	SHA256 entities.SHA256
}

type DigestMap

type DigestMap struct {
	JSONBaseObject
	Version string
	// Digests' order is arbitrary and can't be relied on.
	Digests    []DigestEntry
	DigestMaps []Hash
}

func GetDigestMap

func GetDigestMap(ctx context.Context, tree entities.Hash, store entities.CASStore) (*DigestMap, error)

GetDigestMap fetches and decodes the DigestMap associated with the tree hash from the store.

func (*DigestMap) Decode

func (d *DigestMap) Decode(hash Hash, content []byte) error

func (*DigestMap) Encode

func (d *DigestMap) Encode() error
func (d *DigestMap) Links() []Hash

type DigestMapRequest

type DigestMapRequest struct {
	JSONBaseObject
	Version string
	Tree    Hash
}

func (*DigestMapRequest) Decode

func (d *DigestMapRequest) Decode(hash Hash, content []byte) error

func (*DigestMapRequest) Encode

func (d *DigestMapRequest) Encode() error
func (d *DigestMapRequest) Links() []Hash

type EnvVars

type EnvVars struct {
	JSONBaseObject
	Vars map[string]string
}

func (*EnvVars) Decode

func (e *EnvVars) Decode(hash Hash, content []byte) error

func (*EnvVars) Encode

func (e *EnvVars) Encode() error
func (e *EnvVars) Links() []Hash

type Eval

type Eval struct {
	Log io.Writer

	Filter           ReadPatchFilter
	VI               ValidateInfo
	StrictTappingOff bool
	// contains filtered or unexported fields
}

func NewEval

func NewEval(abfs *Client, chroot string, strictTapping bool, req *EvalRequest, buildStart *BuildStart) *Eval

func (*Eval) MapRequest

func (e *Eval) MapRequest(proc *exec.Cmd) *maps.MapRequest

func (*Eval) Run

func (e *Eval) Run(proc *exec.Cmd) func(maps.MapObject) (maps.MapObject, error)

func (*Eval) Validate

func (e *Eval) Validate() func(resp maps.MapObject) (bool, error)

type EvalPostProcess

type EvalPostProcess struct {
	Resp *EvalResponse
	// ChrootToStrip is the chroot prefix to strip off of the eval response paths.
	// It is not joined with the CWD for path resolution. Append the chroot to CWD value if this is necessary.
	ChrootToStrip string
	Req           *EvalRequest
	// CWD is optional if we are already os.Chdir'd to the correct directory.
	// If specified, it is joined with any relative paths that
	// need to be opened like DepFile and symlinks. It is not joined with
	// ChrootToStrip.
	CWD string
}

type EvalRequest

type EvalRequest struct {
	JSONBaseObject
	Version string
	Salt    string `json:",omitempty"`
	Targets []string
	DepFile string `json:",omitempty"`
	Command string
	// Inputs is deprecated - use InputPatch
	Inputs map[string]Hash `json:",omitempty"`
	// The State field isn't used in the PatchEntry structs
	InputPatch entities.Patch
	RSP        string `json:",omitempty"`
	EnvVars    Hash
	// CWD - current working directory
	CWD string `json:",omitempty"`
}

func (*EvalRequest) Decode

func (e *EvalRequest) Decode(hash Hash, content []byte) error

func (*EvalRequest) Encode

func (e *EvalRequest) Encode() error
func (e *EvalRequest) Links() []Hash

type EvalResponse

type EvalResponse struct {
	JSONBaseObject
	Version     string
	EvalRequest Hash
	Stdout      string
	Stderr      string
	ExitCode    int
	RunInfo     struct {
		Pid                 int
		Timestamp           time.Time
		BuildStartHash      Hash
		RunDuration         float64
		SnapshotDuration    float64
		PostProcessDuration float64
		UserTime            float64
		SysTime             float64
		Memory              int64
		TapCounts           map[string]uint64 `json:",omitempty"`
		IO                  struct {
			In  int64
			Out int64
		}
		Misc struct {
			SoftFault           int64
			HardFault           int64
			VolContextSwitch    int64
			ForcedContextSwitch int64
		}
	}
	ReadPatch     entities.Patch
	MissingReads  map[string]entities.PatchEntryState `json:",omitempty"`
	WritePatch    entities.Patch
	MissingWrites map[string]entities.PatchEntryState `json:",omitempty"`
	Deletes       entities.DeletePatch
}

func DecodeEvalResponse

func DecodeEvalResponse(hash Hash, content []byte) (*EvalResponse, error)

func EvalRespFromTapResult

func EvalRespFromTapResult(tap entities.TapCmdResult) *EvalResponse

EvalRespFromTapResult does a conversion of the raw tap data into an EvalResponse. ProcessResult will likely need to be called afterwards before use/storage.

func ResponseFromRun

func ResponseFromRun(r run.RunResult) *EvalResponse

func Revalidate

func Revalidate(ctx context.Context, abfs *Client, chroot string, outHash entities.Hash, filter ReadPatchFilter) (*EvalResponse, error)

Revalidate if a output hash is still valid based on the current work directory

func (*EvalResponse) CPUTime

func (e *EvalResponse) CPUTime() float64

func (*EvalResponse) Decode

func (e *EvalResponse) Decode(hash Hash, content []byte) error

func (*EvalResponse) Encode

func (e *EvalResponse) Encode() error
func (e *EvalResponse) Links() []Hash

func (*EvalResponse) Print

func (e *EvalResponse) Print(w io.Writer) error

type FileEntry

type FileEntry = entities.FileEntry

type GitRepo

type GitRepo struct {
	GitDir       string
	ObjectsDir   string
	HeadTreeHash entities.Hash
}

type GitRepoSnapshot

type GitRepoSnapshot struct {
	WorkDir     string
	GitDir      string
	ObjectsDir  string
	WorkDirHash entities.Hash
	PacksHash   entities.Hash
	GitDirHash  entities.Hash
	IndexHash   entities.Hash
}

type Hash

type Hash = entities.Hash

func StoreEnvVars

func StoreEnvVars(store entities.CASStore, envVars map[string]string) (Hash, error)

type HashStat

type HashStat = entities.HashStat

type IndexSnapEntry

type IndexSnapEntry struct {
	Name string
	Hash entities.Hash
	Size int64
	Mode uint32
}

type IndexSnapObject

type IndexSnapObject struct {
	JSONBaseObject
	Version string
	Entries []IndexSnapEntry
}

func (*IndexSnapObject) Decode

func (s *IndexSnapObject) Decode(hash Hash, content []byte) error

func (*IndexSnapObject) Encode

func (s *IndexSnapObject) Encode() error
func (s *IndexSnapObject) Links() []Hash

type JSONBaseObject

type JSONBaseObject = objects.JSONBaseObject

type LFSRequest

type LFSRequest struct {
	JSONBaseObject
	LFSOID string // git-lfs representation (does not include a header)
}

func (*LFSRequest) Decode

func (l *LFSRequest) Decode(hash Hash, content []byte) error

func (*LFSRequest) Encode

func (l *LFSRequest) Encode() error
func (l *LFSRequest) Links() []Hash

type LFSResult

type LFSResult struct {
	JSONBaseObject
	LFSRequest Hash
	ABFSOID    Hash // ABFS hash representation (does include blob header)
}

func (*LFSResult) Decode

func (l *LFSResult) Decode(hash Hash, content []byte) error

func (*LFSResult) Encode

func (l *LFSResult) Encode() error
func (l *LFSResult) Links() []Hash

type MatchError

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

func NewMatchError

func NewMatchError(format string, args ...any) *MatchError

func (*MatchError) Error

func (e *MatchError) Error() string

type MountDaemon

type MountDaemon interface {
	Snapshot(ctx context.Context) (Snapshot, error)
	Restore(ctx context.Context, snapshot Snapshot) error
	AddGitRepo(workTree string, repo GitRepo)
	GetGitRepo(workTree string) (GitRepo, bool)
	GetMountDetails() *MountDetails
}

type MountDetails

type MountDetails struct {
	JSONBaseObject
	Version            string
	PID                int
	StartTime          time.Time
	StartTimestamp     int64
	CmdArgs            []string
	MetaRefPrefix      string
	UserName           string
	HostName           string
	ABFSVersion        string
	ManifestHash       Hash
	PinnedManifestHash Hash
	Config             *instance.Config
	MountDuration      float64
	Error              string
}

func (*MountDetails) Decode

func (e *MountDetails) Decode(hash Hash, content []byte) error

func (*MountDetails) Encode

func (e *MountDetails) Encode() error
func (e *MountDetails) Links() []Hash

type NSJailBuild

type NSJailBuild struct {
	Enabled  bool
	Overlays []string
}

type NinjaFailure

type NinjaFailure struct {
	Targets []string
	Req     string
	Resp    string
	Error   string `json:",omitempty"`
}

type NinjaRunInfo

type NinjaRunInfo struct {
	*NinjaStats
	BuildsFiles map[string]string
}

type NinjaStats

type NinjaStats struct {
	GoalTargets        []string
	StartTime          time.Time
	RunSecs            float64
	ParseSecs          float64
	LoadNinjaFilesSecs float64
	LoadFilesSecs      float64
	BuildGraphSecs     float64
	InitStatesSecs     float64
	EvalFilesSecs      float64
	EvalNodesSecs      float64

	GraphNodesCount int
	GraphFilesCount int
	Failures        []NinjaFailure

	NodesCount      uint32
	DoneCount       uint32
	FailCount       uint32
	SkipCount       uint32
	CacheHitCount   uint32
	CacheMissCount  uint32
	CacheForceCount uint32
	CacheHitPercent float64

	NinjaEntryFile string
	BuildFiles     []string `json:",omitempty"`

	Error string
}

type Object

type Object = objects.Object

type ObjectType

type ObjectType = entities.ObjectType
const (
	CurrentBuildInfoVersion            = "0.1"
	ObjectTypeBuildStart    ObjectType = "build-start"
	ObjectTypeBuildInfo     ObjectType = "build-info"
)
const (
	CurrentBuildRequestVersion            = "0.1"
	ObjectTypeBuildRequest     ObjectType = "build-request"
)
const (
	CurrentBuildResultVersion            = "0.2"
	ObjectTypeBuildResult     ObjectType = "build-result"
)
const (
	ObjectTypeEnvVars ObjectType = "env-vars"

	// Bump the eval-request judiciously. It will result in 100% cache misses
	// until the cache is warmed again.
	CurrentEvalRequestVersion            = "0.9.2"
	ObjectTypeEvalRequest     ObjectType = "eval-request"

	CurrentEvalResponseVersion            = "0.7.5"
	ObjectTypeEvalResponse     ObjectType = "eval-response"
)
const (
	CurrentMountDetailsVersion            = "0.2"
	ObjectTypeMountDetails     ObjectType = "mount-details"
)
const (
	CurrentUnmountDetailsVersion            = "0.1"
	ObjectTypeUnmountDetails     ObjectType = "unmount-details"
)
const (
	CurrentPatchVersion            = "0.1"
	ObjectTypePatch     ObjectType = "patch"
)
const (
	ObjectTypeLFSRequest ObjectType = "lfs-request"
)
const (
	ObjectTypeLFSResult ObjectType = "lfs-result"
)

type OldBuildResult01

type OldBuildResult01 struct {
	JSONBaseObject
	Version        string
	BuildRequest   Hash
	MountDetails   Hash
	BuildInfos     []Hash
	UnmountDetails Hash
	Err            string
}

OldBuildResult01 was the format of the struct at version 0.1

func (*OldBuildResult01) ToBuildResult

func (br *OldBuildResult01) ToBuildResult(e *BuildResult)

type PackContentType

type PackContentType string
const (
	CommitsPack   PackContentType = "commits"
	TreesPack     PackContentType = "trees"
	BlobsListPack PackContentType = "blobs-list"
	BlobsPack     PackContentType = "blobs"
)

type PackEntry

type PackEntry struct {
	Type            PackContentType
	PackID          string
	PackedTime      time.Time
	PackingDuration float64
	ObjectsCount    int
	Content         entities.Hash
	ContentSize     int64
	Index           entities.Hash
	IndexSize       int64
}

type PackFiles

type PackFiles struct {
	JSONBaseObject
	Version        string
	Strategy       PackingStrategy
	LastUpdateTime time.Time
	Packs          []PackEntry
}

func FetchPacksFromStore

func FetchPacksFromStore(ctx context.Context, server, project string, store entities.CASStore) (*PackFiles, error)

func (*PackFiles) Decode

func (p *PackFiles) Decode(hash Hash, content []byte) error

func (*PackFiles) Encode

func (p *PackFiles) Encode() error
func (p *PackFiles) Links() []Hash

type PackingStrategy

type PackingStrategy string
const (
	PackingStrategyNone      PackingStrategy = "none"
	PackingStrategyCommits   PackingStrategy = "commits"
	PackingStrategyTrees     PackingStrategy = "trees"
	PackingStrategyBlobsList PackingStrategy = "blobs-list"
	PackingStrategyBlobs     PackingStrategy = "blobs"
)

func (PackingStrategy) Validate

func (s PackingStrategy) Validate() error

type PatchObject

type PatchObject struct {
	JSONBaseObject
	// we can't embed entities.Patch into this object because then the JSON Marshaler
	// just calls entities.Patch.MarshalJSON() and ignores the Version field
	Patch   entities.Patch
	Version string
}

func (*PatchObject) Decode

func (e *PatchObject) Decode(hash Hash, content []byte) error

func (*PatchObject) Encode

func (e *PatchObject) Encode() error
func (e *PatchObject) Links() []Hash

type ProjectStatus

type ProjectStatus struct {
	JSONBaseObject
	Version     string
	Pusher      string
	LFS         bool
	LastSuccess time.Time
	LastUpdate  time.Time
	LastError   string
}

func FetchProjectStatusFromStore

func FetchProjectStatusFromStore(ctx context.Context, server, project string, store entities.CASStore) (*ProjectStatus, error)

func (*ProjectStatus) Decode

func (p *ProjectStatus) Decode(hash Hash, content []byte) error

func (*ProjectStatus) Encode

func (p *ProjectStatus) Encode() error
func (p *ProjectStatus) Links() []Hash

type PutStrategy

type PutStrategy string
const (
	PutStrategyExactMatch PutStrategy = "exact-match"
	PutStrategyLocalWin   PutStrategy = "local-wins"
	PutStrategyRemoteWin  PutStrategy = "remote-wins"
)

func (PutStrategy) IsValid

func (s PutStrategy) IsValid() bool

type PutWSRequest

type PutWSRequest struct {
	WS       string
	IsNew    bool
	Strategy PutStrategy
}

type ReadPatchFilter

type ReadPatchFilter interface {
	Filter(patch entities.Patch, revalidate bool) (entities.Patch, error)
}

Filter a read patch, returning version of read patch and if it should be tried as part of apply

func NewReadPatchFilter

func NewReadPatchFilter() ReadPatchFilter

type SHA256

type SHA256 = entities.SHA256

type Snapshot

type Snapshot struct {
	Root      entities.Hash
	GitRepos  []GitRepoSnapshot
	Conflicts []string
}

func (Snapshot) Equals

func (s Snapshot) Equals(snapshot Snapshot) bool

type UnmountDetails

type UnmountDetails struct {
	JSONBaseObject
	Version          string
	MountDetails     Hash
	MountedDuration  float64
	UnmountTime      time.Time
	ABFSKillDuration float64
	UnmountDuration  float64
	UnmountBusy      float64
}

func (*UnmountDetails) Decode

func (e *UnmountDetails) Decode(hash Hash, content []byte) error

func (*UnmountDetails) Encode

func (e *UnmountDetails) Encode() error
func (e *UnmountDetails) Links() []Hash

type ValidateInfo

type ValidateInfo interface {
	ValidateError(resp *EvalResponse, err error)
}

type WSSnapshot

type WSSnapshot struct {
	JSONBaseObject
	Version      string
	MountDetails entities.Hash
	Time         time.Time
	Snapshot     Snapshot
}

func (*WSSnapshot) Decode

func (s *WSSnapshot) Decode(hash Hash, content []byte) error

func (*WSSnapshot) Encode

func (s *WSSnapshot) Encode() error
func (s *WSSnapshot) Links() []Hash

type WorkspaceStatus

type WorkspaceStatus struct {
	Name          string
	Path          string
	Conflicts     []string
	LastSyncError string
	LastSyncStart time.Time
	LastSyncEnd   time.Time
	LastUpdate    time.Time
	LastSnapshot  entities.Hash
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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