Documentation
¶
Index ¶
- Constants
- func IsGitPath(p string) bool
- func IsMatchError(err error) bool
- func ProjectGitConfig(info ProjectInfo) ([]byte, error)
- func WriteFile(ctx context.Context, root bindcas.Dir, name string, reader io.Reader) (returnErr error)
- func WriteJson(w http.ResponseWriter, r interface{})
- type AddDigestMapEntriesInput
- type BackendStatDTO
- type CasfsMount
- func (m *CasfsMount) AddDigestMapEntries(entries []binding.DigestEntry)
- func (m *CasfsMount) AddEntry(ctx context.Context, name string, mode entities.FileMode, hash entities.Hash, ...) error
- func (m *CasfsMount) BackendStatToRBE(ctx context.Context, p string, bStat bindcas.CASBackendStat) (*RBEPathStat, error)
- func (m *CasfsMount) CASFS() bindcas.CASFS
- func (m *CasfsMount) Chroot(ctx context.Context, p string) (bindcas.Dir, error)
- func (m *CasfsMount) Config() *entities.FSConfig
- func (m *CasfsMount) CreateDir(path string) bindcas.Dir
- func (m *CasfsMount) CreateFile(ctx context.Context, name string, mode entities.FileMode, hash entities.Hash, ...) error
- func (m *CasfsMount) GetRBEDigest(ctx context.Context, p string) (*RBEPathStat, error)
- func (m *CasfsMount) GetRBEDigests(ctx context.Context, goCount int64, paths []string) ([]RBEPathStat, map[string]string)
- func (m *CasfsMount) GetRBETapDigest(ctx context.Context, goCount int64, input RBETapDigestInput) (*RBETapDigestResponse, error)
- func (m *CasfsMount) HashStats(ctx context.Context, goCount int64, prefix string, paths []string) ([]entities.HashStat, map[string]string)
- func (m *CasfsMount) Hashes(ctx context.Context, goCount int64, prefix string, paths []string) ([]string, map[string]string)
- func (m *CasfsMount) LoadTreeDigestMap(ctx context.Context, tree entities.Hash) error
- func (m *CasfsMount) MatchAndPatch(ctx context.Context, goCount int64, chroot string, ...) error
- func (m *CasfsMount) Matches(ctx context.Context, goCount int64, chroot string, patch entities.Patch) error
- func (m *CasfsMount) Mount(ctx context.Context, mountPoint string, mntInfo MountInfo, ...) error
- func (m *CasfsMount) NewGitDir(ctx context.Context, root, dir bindcas.Dir, info ProjectInfo) error
- func (m *CasfsMount) NewRepoObjDir(ctx context.Context, root, dir bindcas.Dir, name string, info ProjectInfo) error
- func (m *CasfsMount) Ready()
- func (m *CasfsMount) Root() bindcas.Dir
- func (m *CasfsMount) Serve() error
- func (m *CasfsMount) SetInitConfig(c *entities.FSConfig)
- func (m *CasfsMount) SetRBEDigest(ctx context.Context, p string, digest rbemodel.Digest, mode uint32) error
- func (m *CasfsMount) SetRBEDigests(ctx context.Context, goCount int64, items []RBEPathStat) map[string]string
- func (m *CasfsMount) Unmount()
- type Daemon
- type GetRBEDigestInput
- type GetRBEDigestsInput
- type HTTP
- type HTTPMount
- type LoadTreeDigestMapInput
- type MatchError
- type MatchInput
- type Mount
- type MountInfo
- type OsMounter
- type PatchInput
- type ProjectInfo
- type RBEPathStat
- type RBETapDigestInput
- type RBETapDigestResponse
- type SetRBEDigestsInput
Constants ¶
View Source
const ClientThrottleLevel = 10
When to start throttling client goroutines
View Source
const MaxConcurrentOps = 8000
The default value for maximum number of os-threads in golang is 10000. We save 2000 for other potential concurrent sys-calls, and leave 8000 for abfs interactions.
Variables ¶
This section is empty.
Functions ¶
func IsMatchError ¶
func ProjectGitConfig ¶
func ProjectGitConfig(info ProjectInfo) ([]byte, error)
func WriteJson ¶
func WriteJson(w http.ResponseWriter, r interface{})
Types ¶
type AddDigestMapEntriesInput ¶
type AddDigestMapEntriesInput struct {
Entries []binding.DigestEntry `json:"entries"`
}
type BackendStatDTO ¶
type CasfsMount ¶
type CasfsMount struct {
MountInfo
// contains filtered or unexported fields
}
Provide Mount via cas filesystem
func NewCasfsMount ¶
func NewCasfsMount(osMounter OsMounter) *CasfsMount
func (*CasfsMount) AddDigestMapEntries ¶
func (m *CasfsMount) AddDigestMapEntries(entries []binding.DigestEntry)
func (*CasfsMount) BackendStatToRBE ¶
func (m *CasfsMount) BackendStatToRBE(ctx context.Context, p string, bStat bindcas.CASBackendStat) (*RBEPathStat, error)
func (*CasfsMount) CASFS ¶
func (m *CasfsMount) CASFS() bindcas.CASFS
func (*CasfsMount) Config ¶
func (m *CasfsMount) Config() *entities.FSConfig
func (*CasfsMount) CreateFile ¶
func (*CasfsMount) GetRBEDigest ¶
func (m *CasfsMount) GetRBEDigest(ctx context.Context, p string) (*RBEPathStat, error)
func (*CasfsMount) GetRBEDigests ¶
func (m *CasfsMount) GetRBEDigests(ctx context.Context, goCount int64, paths []string) ([]RBEPathStat, map[string]string)
func (*CasfsMount) GetRBETapDigest ¶
func (m *CasfsMount) GetRBETapDigest(ctx context.Context, goCount int64, input RBETapDigestInput) (*RBETapDigestResponse, error)
func (*CasfsMount) LoadTreeDigestMap ¶
func (*CasfsMount) MatchAndPatch ¶
func (m *CasfsMount) MatchAndPatch(ctx context.Context, goCount int64, chroot string, readPatch, writePatch entities.Patch, deletes entities.DeletePatch) error
func (*CasfsMount) NewGitDir ¶
func (m *CasfsMount) NewGitDir(ctx context.Context, root, dir bindcas.Dir, info ProjectInfo) error
func (*CasfsMount) NewRepoObjDir ¶
func (m *CasfsMount) NewRepoObjDir(ctx context.Context, root, dir bindcas.Dir, name string, info ProjectInfo) error
func (*CasfsMount) Ready ¶
func (m *CasfsMount) Ready()
func (*CasfsMount) Root ¶
func (m *CasfsMount) Root() bindcas.Dir
func (*CasfsMount) Serve ¶
func (m *CasfsMount) Serve() error
func (*CasfsMount) SetInitConfig ¶
func (m *CasfsMount) SetInitConfig(c *entities.FSConfig)
func (*CasfsMount) SetRBEDigest ¶
func (*CasfsMount) SetRBEDigests ¶
func (m *CasfsMount) SetRBEDigests(ctx context.Context, goCount int64, items []RBEPathStat) map[string]string
func (*CasfsMount) Unmount ¶
func (m *CasfsMount) Unmount()
type GetRBEDigestInput ¶
type GetRBEDigestInput struct {
Path string `json:"path"`
}
type GetRBEDigestsInput ¶
type GetRBEDigestsInput struct {
Paths []string `json:"paths"`
}
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
HTTP interface to mounts (abfs/casfs)
type HTTPMount ¶
type HTTPMount interface {
// Hashes find the hash of a list of paths. Unknown paths will return the empty
// file hash instead of an error.
Hashes(ctx context.Context, goCnt int64, prefix string, paths []string) (result []string, errs map[string]string)
// HashStats find the hash, size, and file mode of a list of paths. Unknown paths will return the empty
// file hash instead of an error.
HashStats(ctx context.Context, goCnt int64, prefix string, paths []string) (result []entities.HashStat, errs map[string]string)
Matches(ctx context.Context, goCnt int64, path string, patch entities.Patch) error
MatchAndPatch(ctx context.Context, goCnt int64, path string, readPatch, writePatch entities.Patch, deletes entities.DeletePatch) error
NewGitDir(ctx context.Context, root, dir bindcas.Dir, info ProjectInfo) error
NewRepoObjDir(ctx context.Context, root, dir bindcas.Dir, name string, info ProjectInfo) error
Root() bindcas.Dir
SetRBEDigest(ctx context.Context, path string, digest rbemodel.Digest, mode uint32) error
GetRBEDigest(ctx context.Context, path string) (*RBEPathStat, error)
SetRBEDigests(ctx context.Context, goCount int64, digests []RBEPathStat) (errs map[string]string)
GetRBEDigests(ctx context.Context, goCount int64, paths []string) (result []RBEPathStat, errs map[string]string)
GetRBETapDigest(ctx context.Context, goCount int64, input RBETapDigestInput) (*RBETapDigestResponse, error)
LoadTreeDigestMap(ctx context.Context, tree entities.Hash) error
AddDigestMapEntries(entries []binding.DigestEntry)
}
type LoadTreeDigestMapInput ¶
type LoadTreeDigestMapInput struct {
Tree string `json:"tree"`
}
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 MatchInput ¶
type Mount ¶
type Mount interface {
HTTPMount
SetInitConfig(c *entities.FSConfig)
Config() *entities.FSConfig
Mount(ctx context.Context, mountPoint string, mntInfo MountInfo, store entities.CASStore) error
Unmount()
Chroot(ctx context.Context, path string) (bindcas.Dir, error)
Serve() error
Ready()
CASFS() bindcas.CASFS
CreateDir(path string) bindcas.Dir
}
type PatchInput ¶
type ProjectInfo ¶
type RBEPathStat ¶
type RBETapDigestInput ¶
type RBETapDigestInput struct {
Reads map[string]bindcas.CASBackendStat `json:"reads"`
Writes map[string]bindcas.CASBackendStat `json:"writes"`
}
func (RBETapDigestInput) MarshalJSON ¶
func (input RBETapDigestInput) MarshalJSON() ([]byte, error)
MarshalJSON serializes RBETapDigestInput for client HTTP requests (e.g., in cmd/rbetap).
func (*RBETapDigestInput) UnmarshalJSON ¶
func (input *RBETapDigestInput) UnmarshalJSON(data []byte) error
UnmarshalJSON deserializes RBETapDigestInput for server HTTP handlers (e.g., in handleGetRBETapDigest).
type RBETapDigestResponse ¶
type RBETapDigestResponse struct {
Reads []RBEPathStat `json:"reads"`
Writes []RBEPathStat `json:"writes"`
}
type SetRBEDigestsInput ¶
type SetRBEDigestsInput struct {
Digests []RBEPathStat `json:"digests"`
}
Click to show internal directories.
Click to hide internal directories.