fs

package
v0.0.0-...-5d4f8f2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFileOpLimit             = 5
	DefaultPerm        os.FileMode = 0775

	DefaultModelPath             = "/saved_models"
	DefaultModelPerm os.FileMode = 0775

	DefaultOutPath             = "/out"
	DefaultOutPerm os.FileMode = 0775

	DefaultDataPath             = "/data"
	DefaultDataPerm os.FileMode = 0775
)

Variables

This section is empty.

Functions

func DirNameForRepo

func DirNameForRepo(repoName string) string

Types

type CountWriter

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

customer writer to keep track of writes

func (*CountWriter) Write

func (c *CountWriter) Write(b []byte) (int, error)

type RepoFs

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

func NewRepoFs

func NewRepoFs(basePath string, parallel int, repoName string, branchName string, commitId string, c *api_client.ApiClient, ignoreList []string) *RepoFs

func (*RepoFs) BranchName

func (fs *RepoFs) BranchName() (branchName string)

func (*RepoFs) Clone

func (fs *RepoFs) Clone() (*ws.Commit, error)

func (*RepoFs) CommitId

func (fs *RepoFs) CommitId() (commitId string)

func (*RepoFs) CreateRepoDir

func (fs *RepoFs) CreateRepoDir() error

func (*RepoFs) GetLocalFilePath

func (fs *RepoFs) GetLocalFilePath(fileName string) string

func (*RepoFs) GetRepoParams

func (fs *RepoFs) GetRepoParams() (repoName, branchName, commitId string)

func (*RepoFs) GetWorkingDir

func (fs *RepoFs) GetWorkingDir() string

func (*RepoFs) MakeFile

func (fs *RepoFs) MakeFile(fpath string, f func(io.Writer) error) (int64, error)

func (*RepoFs) PullObject

func (fs *RepoFs) PullObject(repoName, commitId, filePath string) (int64, error)

func (*RepoFs) PushRepo

func (fs *RepoFs) PushRepo() (commit *ws.Commit, fnError error)

func (*RepoFs) RepoName

func (fs *RepoFs) RepoName() (repoName string)

func (*RepoFs) SwitchBranch

func (fs *RepoFs) SwitchBranch(name string) error

type SyncOpLimiter

type SyncOpLimiter interface {
	Ask()
	Release()
	Wait()
}

control parallel ops

func NewOpLimiter

func NewOpLimiter(ops int) SyncOpLimiter

Jump to

Keyboard shortcuts

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