Documentation
¶
Index ¶
- Constants
- type FsConfig
- type ServerConfig
- type WorkerClient
- func (wc *WorkerClient) CloseCommit(repoName, branchName, commitId string) error
- func (wc *WorkerClient) DetachWorker(flowId string, taskId string, workerId string) error
- func (wc *WorkerClient) FetchBranchAttrs(repoName, branchName string) (*ws.BranchAttrs, error)
- func (wc *WorkerClient) FetchCommitAttrs(repoName, commitId string) (*ws.CommitAttrs, error)
- func (wc *WorkerClient) FetchCommitMap(repoName, commitId string) (*ws.FileMap, error)
- func (wc *WorkerClient) FetchFileAttrs(repoName string, commitId string, fpath string) (*ws.FileAttrs, error)
- func (wc *WorkerClient) FetchFlowAttrs(flowId string) (*flw.FlowAttrs, error)
- func (wc *WorkerClient) FileCheckIn(repoId, branchName, commitId, filepath string, size int64) (*ws.FileAttrs, error)
- func (wc *WorkerClient) GetFileObject(repoName string, commitId string, fpath string, offset int64, size int64, ...) error
- func (wc *WorkerClient) GetOrCreateFlowOutRepo(flowId string) (*ws.Repo, *ws.Branch, *ws.Commit, error)
- func (wc *WorkerClient) GetOrCreateModelRepo(flowId string) (*ws.Repo, *ws.Branch, *ws.Commit, error)
- func (wc *WorkerClient) ListDir(reponame string, commitId string, path string) (map[string]*ws.FileAttrs, error)
- func (wc *WorkerClient) LookupFile(reponame string, commitId string, p string) (*ws.FileAttrs, error)
- func (wc *WorkerClient) MergePartsNCheckIn(parts []int, repoId, branchName, commitId, filepath string, size int64) (*ws.FileAttrs, error)
- func (wc *WorkerClient) PostLogWriter(taskId string) (io.WriteCloser, error)
- func (wc *WorkerClient) PutFileWriter(repoName string, commitId string, fpath string) (io.WriteCloser, error)
- func (wc *WorkerClient) ReceiveBytesFromURL(surl string) (data []byte, rcvd int64, fnerr error)
- func (wc *WorkerClient) RegisterWorker(flowId string, taskId string, ip string) (*flw.WorkerAttrs, error)
- func (wc *WorkerClient) SendBytesToURL(surl string, data []byte) (sent int64, fnerr error)
- func (wc *WorkerClient) SignedGetPartURL(seq int, repoId, branchName, commitId, filepath string) (string, error)
- func (wc *WorkerClient) SignedGetURL(repoId, branchName, commitId, filepath string) (string, error)
- func (wc *WorkerClient) SignedPutPartURL(seq int, repoId, branchName, commitId, filepath string) (string, error)
- func (wc *WorkerClient) SignedPutURL(repoId, branchName, commitId, filepath string) (string, error)
- func (w *WorkerClient) UpdateTaskStatus(workerId string, taskId string, tsr *flw.TaskStatusChangeRequest) (*flw.TaskStatusChangeResponse, error)
Constants ¶
View Source
const ( RepoUriPath = "repo" RepoAttrsUriPath = "repo_attrs" BranchAttrsUriPath = "branch_attr" CommitUriPath = "commit" CloseCommitUriPath = "commit_close" CommitAttrsUriPath = "commit_attrs" CommitMapUriPath = "commit_map" FileUriPath = "file" FileAttrsUriPath = "file_attrs" ObjectUriPath = "object" VfsUriPath = "vfs" WorkerUriPath = "worker" FlowUriPath = "flow" FlowAttrsUriPath = "flow" TaskAttrsUriPath = "tasks" TasksUriPath = "tasks" TaskStatusUriPath = "task_status" CommandLogUriPath = "/{task_id}/cmd_log" ModelUriPath = "/{task_id}/model" CommitFileURL = "file_url" CommitFileCheckIn = "/file_checkin" CommitFilePartURL = "parts_url" CommitFilePartMerge = "parts_merge" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerConfig ¶
type ServerConfig struct {
// contains filtered or unexported fields
}
type WorkerClient ¶
type WorkerClient struct {
BaseURL *url.URL
Config *config.Config
AuthToken string
// Rest Client to fetch info from server
RepoAttrs rest_client.Interface
// Rest client for commit info
CommitAttrs rest_client.Interface
// Rest client for commit map
CommitMap rest_client.Interface
// Rest client for branch info
BranchAttrs rest_client.Interface
// File Info client
FileAttrs rest_client.Interface
// object client
ContentIo rest_client.Interface
// flow attributes
FlowAttrs rest_client.Interface
TaskAttrs rest_client.Interface
TaskStatus rest_client.Interface
WorkerAttrs rest_client.Interface
// contains filtered or unexported fields
}
func NewWorkerClient ¶
func NewWorkerClient(serverAddr string) (*WorkerClient, error)
func (*WorkerClient) CloseCommit ¶
func (wc *WorkerClient) CloseCommit(repoName, branchName, commitId string) error
func (*WorkerClient) DetachWorker ¶
func (wc *WorkerClient) DetachWorker(flowId string, taskId string, workerId string) error
func (*WorkerClient) FetchBranchAttrs ¶
func (wc *WorkerClient) FetchBranchAttrs(repoName, branchName string) (*ws.BranchAttrs, error)
func (*WorkerClient) FetchCommitAttrs ¶
func (wc *WorkerClient) FetchCommitAttrs(repoName, commitId string) (*ws.CommitAttrs, error)
func (*WorkerClient) FetchCommitMap ¶
func (wc *WorkerClient) FetchCommitMap(repoName, commitId string) (*ws.FileMap, error)
func (*WorkerClient) FetchFileAttrs ¶
func (*WorkerClient) FetchFlowAttrs ¶
func (wc *WorkerClient) FetchFlowAttrs(flowId string) (*flw.FlowAttrs, error)
func (*WorkerClient) FileCheckIn ¶
func (wc *WorkerClient) FileCheckIn(repoId, branchName, commitId, filepath string, size int64) (*ws.FileAttrs, error)
Method requests server to check object size and update in file metadata
func (*WorkerClient) GetFileObject ¶
func (*WorkerClient) GetOrCreateFlowOutRepo ¶
func (*WorkerClient) GetOrCreateModelRepo ¶
func (*WorkerClient) LookupFile ¶
func (*WorkerClient) MergePartsNCheckIn ¶
func (wc *WorkerClient) MergePartsNCheckIn(parts []int, repoId, branchName, commitId, filepath string, size int64) (*ws.FileAttrs, error)
Method sends part for merging and checking in final object
func (*WorkerClient) PostLogWriter ¶
func (wc *WorkerClient) PostLogWriter(taskId string) (io.WriteCloser, error)
func (*WorkerClient) PutFileWriter ¶
func (wc *WorkerClient) PutFileWriter(repoName string, commitId string, fpath string) (io.WriteCloser, error)
func (*WorkerClient) ReceiveBytesFromURL ¶
func (wc *WorkerClient) ReceiveBytesFromURL(surl string) (data []byte, rcvd int64, fnerr error)
func (*WorkerClient) RegisterWorker ¶
func (wc *WorkerClient) RegisterWorker(flowId string, taskId string, ip string) (*flw.WorkerAttrs, error)
func (*WorkerClient) SendBytesToURL ¶
func (wc *WorkerClient) SendBytesToURL(surl string, data []byte) (sent int64, fnerr error)
Method sends data to cloud storage server through signed url
func (*WorkerClient) SignedGetPartURL ¶
func (wc *WorkerClient) SignedGetPartURL(seq int, repoId, branchName, commitId, filepath string) (string, error)
func (*WorkerClient) SignedGetURL ¶
func (wc *WorkerClient) SignedGetURL(repoId, branchName, commitId, filepath string) (string, error)
func (*WorkerClient) SignedPutPartURL ¶
func (wc *WorkerClient) SignedPutPartURL(seq int, repoId, branchName, commitId, filepath string) (string, error)
func (*WorkerClient) SignedPutURL ¶
func (wc *WorkerClient) SignedPutURL(repoId, branchName, commitId, filepath string) (string, error)
func (*WorkerClient) UpdateTaskStatus ¶
func (w *WorkerClient) UpdateTaskStatus(workerId string, taskId string, tsr *flw.TaskStatusChangeRequest) (*flw.TaskStatusChangeResponse, error)
Click to show internal directories.
Click to hide internal directories.