Documentation ¶
Index ¶
- Constants
- func DefaultDialOptions() []grpc.DialOption
- func GetDatumTotalTime(s *pps.ProcessStats) time.Duration
- func GetTransaction(ctx context.Context) (*transaction.Transaction, error)
- func GetUserMachineAddr(context *config.Context) (addr *grpcutil.PachdAddress, err error)
- func NewBranch(repoName string, branchName string) *pfs.Branchdeprecated
- func NewCommit(repoName, branchName, commitID string) *pfs.Commitdeprecated
- func NewCommitSet(id string) *pfs.CommitSet
- func NewCronInput(name string, spec string) *pps.Input
- func NewCronInputOpts(name string, repo string, spec string, overwrite bool, start *types.Timestamp) *pps.Input
- func NewCrossInput(input ...*pps.Input) *pps.Input
- func NewFile(repoName, branchName, commitID, path string) *pfs.Filedeprecated
- func NewGroupInput(input ...*pps.Input) *pps.Input
- func NewJob(pipelineName, jobID string) *pps.Jobdeprecated
- func NewJobInput(repoName, branchName, commitID, glob string) *pps.JobInputdeprecated
- func NewJobSet(id string) *pps.JobSet
- func NewJoinInput(input ...*pps.Input) *pps.Input
- func NewPFSInput(repo, glob string) *pps.Inputdeprecated
- func NewPFSInputOpts(name, repo, branch, glob, joinOn, groupBy string, outerJoin, lazy bool, ...) *pps.Inputdeprecated
- func NewPipeline(pipelineName string) *pps.Pipelinedeprecated
- func NewProject(name string) *pfs.Project
- func NewProjectBranch(projectName, repoName, branchName string) *pfs.Branch
- func NewProjectCommit(projectName, repoName, branchName, commitID string) *pfs.Commit
- func NewProjectFile(projectName, repoName, branchName, commitID, path string) *pfs.File
- func NewProjectJob(projectName, pipelineName, jobID string) *pps.Job
- func NewProjectJobInput(projectName, repoName, branchName, commitID, glob string) *pps.JobInput
- func NewProjectPFSInput(project, repo, glob string) *pps.Input
- func NewProjectPFSInputOpts(name, project, repo, branch, glob, joinOn, groupBy string, ...) *pps.Input
- func NewProjectPipeline(projectName, pipelineName string) *pps.Pipeline
- func NewProjectRepo(projectName, repoName string) *pfs.Repo
- func NewProjectS3PFSInput(name, project, repo, branch string) *pps.Input
- func NewProxyPostgresListener(clientFactory func() (proxy.APIClient, error)) col.PostgresListener
- func NewRepo(repoName string) *pfs.Repodeprecated
- func NewS3PFSInput(name, repo, branch string) *pps.Inputdeprecated
- func NewSystemProjectRepo(projectName, repoName, repoType string) *pfs.Repo
- func NewSystemRepo(repoName string, repoType string) *pfs.Repodeprecated
- func NewUnionInput(input ...*pps.Input) *pps.Input
- func WithSystemCAs(settings *clientSettings) error
- type APIClient
- func NewEnterpriseClientForTest() (*APIClient, error)
- func NewEnterpriseClientOnUserMachine(prefix string, options ...Option) (*APIClient, error)
- func NewEnterpriseClientOnUserMachineContext(ctx context.Context, prefix string, options ...Option) (*APIClient, error)
- func NewForTest() (*APIClient, error)
- func NewFromPachdAddress(pachdAddress *grpcutil.PachdAddress, options ...Option) (*APIClient, error)deprecated
- func NewFromPachdAddressContext(ctx context.Context, pachdAddress *grpcutil.PachdAddress, options ...Option) (*APIClient, error)
- func NewFromURI(uri string, options ...Option) (*APIClient, error)deprecated
- func NewFromURIContext(ctx context.Context, uri string, options ...Option) (*APIClient, error)
- func NewInCluster(options ...Option) (*APIClient, error)deprecated
- func NewInClusterContext(ctx context.Context, options ...Option) (*APIClient, error)
- func NewInWorker(options ...Option) (*APIClient, error)deprecated
- func NewInWorkerContext(ctx context.Context, options ...Option) (*APIClient, error)
- func NewOnUserMachine(prefix string, options ...Option) (*APIClient, error)deprecated
- func NewOnUserMachineContext(ctx context.Context, prefix string, options ...Option) (*APIClient, error)
- func (c APIClient) AddFileSet(repo, branch, commit, ID string) (retErr error)deprecated
- func (c *APIClient) AddMetadata(ctx context.Context) context.Context
- func (c APIClient) AddProjectFileSet(project, repo, branch, commit, ID string) (retErr error)
- func (c *APIClient) AuthToken() string
- func (c APIClient) Binary(filter *debug.Filter, w io.Writer) (retErr error)
- func (c APIClient) ClearCommit(repoName string, branchName string, commitID string) (retErr error)deprecated
- func (c APIClient) ClearProjectCommit(projectName, repoName, branchName, commitID string) (retErr error)
- func (c *APIClient) ClientContextName() string
- func (c *APIClient) Close() error
- func (c APIClient) ComposeFileSet(IDs []string, ttl time.Duration) (_ string, retErr error)
- func (c APIClient) CopyFile(dstCommit *pfs.Commit, dstPath string, srcCommit *pfs.Commit, srcPath string, ...) error
- func (c APIClient) CreateBranch(repoName string, branchName string, commitBranch string, commitID string, ...) errordeprecated
- func (c APIClient) CreateBranchTrigger(repoName string, branchName string, commitBranch string, commitID string, ...) errordeprecated
- func (c APIClient) CreatePipeline(pipelineName, image string, cmd []string, stdin []string, ...) errordeprecated
- func (c APIClient) CreatePipelineService(pipelineName, image string, cmd, stdin []string, ...) errordeprecated
- func (c APIClient) CreateProject(name string) error
- func (c APIClient) CreateProjectBranch(projectName, repoName, branchName, commitBranch, commitID string, ...) error
- func (c APIClient) CreateProjectBranchTrigger(projectName, repoName, branchName, commitBranch, commitID string, ...) error
- func (c APIClient) CreateProjectPipeline(projectName, pipelineName, image string, cmd []string, stdin []string, ...) error
- func (c APIClient) CreateProjectPipelineService(projectName, pipelineName, image string, cmd, stdin []string, ...) error
- func (c APIClient) CreateProjectRepo(projectName, repoName string) error
- func (c APIClient) CreateRepo(repoName string) errordeprecated
- func (c APIClient) CreateSecret(file []byte) error
- func (c *APIClient) Ctx() context.Context
- func (c APIClient) DeleteAll() error
- func (c APIClient) DeleteAllEnterprise() error
- func (c APIClient) DeleteBranch(repoName string, branchName string, force bool) errordeprecated
- func (c APIClient) DeleteFile(commit *pfs.Commit, path string, opts ...DeleteFileOption) error
- func (c APIClient) DeleteJob(pipelineName, jobID string) errordeprecated
- func (c APIClient) DeletePipeline(pipelineName string, force bool) errordeprecated
- func (c APIClient) DeleteProject(projectName string, force bool) error
- func (c APIClient) DeleteProjectBranch(projectName, repoName, branchName string, force bool) error
- func (c APIClient) DeleteProjectJob(projectName, pipelineName, jobID string) error
- func (c APIClient) DeleteProjectPipeline(projectName, pipelineName string, force bool) error
- func (c APIClient) DeleteProjectRepo(projectName, repoName string, force bool) error
- func (c APIClient) DeleteRepo(repoName string, force bool) errordeprecated
- func (c APIClient) DeleteSecret(secret string) error
- func (c APIClient) DeleteTransaction(txn *transaction.Transaction) error
- func (c APIClient) DiffFile(newCommit *pfs.Commit, newPath string, oldCommit *pfs.Commit, oldPath string, ...) (retErr error)
- func (c APIClient) DiffFileAll(newCommit *pfs.Commit, newPath string, oldCommit *pfs.Commit, oldPath string, ...) (_ []*pfs.FileInfo, _ []*pfs.FileInfo, retErr error)
- func (c APIClient) DropCommitSet(id string) error
- func (c APIClient) Dump(filter *debug.Filter, limit int64, w io.Writer) (retErr error)
- func (c APIClient) ExecuteInTransaction(f func(c *APIClient) error) (*transaction.TransactionInfo, error)
- func (c APIClient) FindCommits(req *pfs.FindCommitsRequest) (*FindCommitsResponse, error)
- func (c APIClient) FinishCommit(repoName string, branchName string, commitID string) (retErr error)deprecated
- func (c APIClient) FinishProjectCommit(projectName, repoName, branchName, commitID string) (retErr error)
- func (c APIClient) FinishTransaction(txn *transaction.Transaction) (*transaction.TransactionInfo, error)
- func (c APIClient) Fsck(fix bool, cb func(*pfs.FsckResponse) error, opts ...FsckOption) error
- func (c APIClient) FsckFastExit() error
- func (c *APIClient) GetAddress() *grpcutil.PachdAddress
- func (c APIClient) GetClusterRoleBinding() (*auth.RoleBinding, error)
- func (c APIClient) GetFile(commit *pfs.Commit, path string, w io.Writer, opts ...GetFileOption) (retErr error)
- func (c APIClient) GetFileReadSeeker(commit *pfs.Commit, path string) (io.ReadSeeker, error)
- func (c APIClient) GetFileReader(commit *pfs.Commit, path string) (io.Reader, error)
- func (c APIClient) GetFileSet(repo, branch, commit string) (_ string, retErr error)deprecated
- func (c APIClient) GetFileTAR(commit *pfs.Commit, path string) (io.ReadCloser, error)
- func (c APIClient) GetFileURL(commit *pfs.Commit, path, URL string) (retErr error)
- func (c APIClient) GetLogs(pipelineName, jobID string, data []string, datumID string, master, follow bool, ...) *LogsIterdeprecated
- func (c APIClient) GetLogsLoki(pipelineName string, jobID string, data []string, datumID string, master bool, ...) *LogsIter
- func (c APIClient) GetProjectFileSet(project, repo, branch, commit string) (_ string, retErr error)
- func (c APIClient) GetProjectLogs(projectName, pipelineName, jobID string, data []string, datumID string, ...) *LogsIter
- func (c APIClient) GetProjectLogsLoki(projectName, pipelineName, jobID string, data []string, datumID string, ...) *LogsIter
- func (c APIClient) GetProjectRepoRoleBinding(projectName, repoName string) (*auth.RoleBinding, error)
- func (c APIClient) GetProjectRoleBinding(project string) (*auth.RoleBinding, error)
- func (c APIClient) GetRepoRoleBinding(repoName string) (*auth.RoleBinding, error)deprecated
- func (c APIClient) GetTransaction() (*transaction.Transaction, error)
- func (c APIClient) GlobFile(commit *pfs.Commit, pattern string, cb func(fi *pfs.FileInfo) error) (retErr error)
- func (c APIClient) GlobFileAll(commit *pfs.Commit, pattern string) (_ []*pfs.FileInfo, retErr error)
- func (c APIClient) Health() error
- func (c APIClient) InspectBranch(repoName string, branchName string) (*pfs.BranchInfo, error)deprecated
- func (c APIClient) InspectCluster() (*admin.ClusterInfo, error)
- func (c APIClient) InspectClusterWithVersion(v *versionpb.Version) (*admin.ClusterInfo, error)
- func (c APIClient) InspectCommit(repoName, branchName, commitID string) (_ *pfs.CommitInfo, retErr error)deprecated
- func (c APIClient) InspectCommitSet(id string) (_ []*pfs.CommitInfo, retErr error)
- func (c APIClient) InspectDatum(pipelineName string, jobID string, datumID string) (*pps.DatumInfo, error)deprecated
- func (c APIClient) InspectFile(commit *pfs.Commit, path string) (_ *pfs.FileInfo, retErr error)
- func (c APIClient) InspectJob(pipelineName string, jobID string, details bool) (_ *pps.JobInfo, retErr error)deprecated
- func (c APIClient) InspectJobSet(id string, details bool) (_ []*pps.JobInfo, retErr error)
- func (c APIClient) InspectPipeline(pipelineName string, details bool) (*pps.PipelineInfo, error)deprecated
- func (c APIClient) InspectProject(name string) (*pfs.ProjectInfo, error)
- func (c APIClient) InspectProjectBranch(projectName, repoName string, branchName string) (*pfs.BranchInfo, error)
- func (c APIClient) InspectProjectCommit(projectName, repoName, branchName, commitID string) (_ *pfs.CommitInfo, retErr error)
- func (c APIClient) InspectProjectDatum(projectName, pipelineName, jobID, datumID string) (*pps.DatumInfo, error)
- func (c APIClient) InspectProjectJob(projectName, pipelineName, jobID string, details bool) (_ *pps.JobInfo, retErr error)
- func (c APIClient) InspectProjectPipeline(projectName, pipelineName string, details bool) (*pps.PipelineInfo, error)
- func (c APIClient) InspectProjectRepo(projectName, repoName string) (_ *pfs.RepoInfo, retErr error)
- func (c APIClient) InspectRepo(repoName string) (_ *pfs.RepoInfo, retErr error)deprecated
- func (c APIClient) InspectSecret(secret string) (*pps.SecretInfo, error)
- func (c APIClient) InspectTransaction(txn *transaction.Transaction) (*transaction.TransactionInfo, error)
- func (c APIClient) IsAuthActive() (bool, error)
- func (c APIClient) ListBranch(repoName string) ([]*pfs.BranchInfo, error)deprecated
- func (c APIClient) ListCommit(repo *pfs.Repo, to, from *pfs.Commit, number int64) ([]*pfs.CommitInfo, error)
- func (c APIClient) ListCommitByRepo(repo *pfs.Repo) ([]*pfs.CommitInfo, error)
- func (c APIClient) ListCommitF(repo *pfs.Repo, to, from *pfs.Commit, number int64, reverse bool, ...) error
- func (c APIClient) ListDatum(pipelineName, jobID string, cb func(*pps.DatumInfo) error) (retErr error)deprecated
- func (c APIClient) ListDatumAll(pipelineName, jobID string) (_ []*pps.DatumInfo, retErr error)deprecated
- func (c APIClient) ListDatumInput(input *pps.Input, cb func(*pps.DatumInfo) error) (retErr error)
- func (c APIClient) ListDatumInputAll(input *pps.Input) (_ []*pps.DatumInfo, retErr error)
- func (c APIClient) ListFile(commit *pfs.Commit, path string, cb func(fi *pfs.FileInfo) error) (retErr error)
- func (c APIClient) ListFileAll(commit *pfs.Commit, path string) (_ []*pfs.FileInfo, retErr error)
- func (c APIClient) ListJob(pipelineName string, inputCommit []*pfs.Commit, history int64, details bool) ([]*pps.JobInfo, error)deprecated
- func (c APIClient) ListJobF(pipelineName string, inputCommit []*pfs.Commit, history int64, details bool, ...) errordeprecated
- func (c APIClient) ListJobFilterF(pipelineName string, inputCommit []*pfs.Commit, history int64, details bool, ...) error
- func (c APIClient) ListPipeline(details bool) ([]*pps.PipelineInfo, error)
- func (c APIClient) ListPipelineHistory(pipelineName string, history int64, details bool) ([]*pps.PipelineInfo, error)deprecated
- func (c APIClient) ListProject() (_ []*pfs.ProjectInfo, retErr error)
- func (c APIClient) ListProjectBranch(projectName, repoName string) ([]*pfs.BranchInfo, error)
- func (c APIClient) ListProjectDatum(projectName, pipelineName, jobID string, cb func(*pps.DatumInfo) error) (retErr error)
- func (c APIClient) ListProjectDatumAll(projectName, pipelineName, jobID string) (_ []*pps.DatumInfo, retErr error)
- func (c APIClient) ListProjectJob(projectName, pipelineName string, inputCommit []*pfs.Commit, history int64, ...) ([]*pps.JobInfo, error)
- func (c APIClient) ListProjectJobF(projectName, pipelineName string, inputCommit []*pfs.Commit, history int64, ...) error
- func (c APIClient) ListProjectJobFilterF(projectName, pipelineName string, inputCommit []*pfs.Commit, history int64, ...) error
- func (c APIClient) ListProjectPipelineHistory(projectName, pipelineName string, history int64, details bool) ([]*pps.PipelineInfo, error)
- func (c APIClient) ListProjectRepo(r *pfs.ListRepoRequest) ([]*pfs.RepoInfo, error)
- func (c APIClient) ListRepo() ([]*pfs.RepoInfo, error)
- func (c APIClient) ListRepoByType(repoType string) (_ []*pfs.RepoInfo, retErr error)
- func (c APIClient) ListSecret() ([]*pps.SecretInfo, error)
- func (c APIClient) ListTask(service string, namespace, group string, cb func(*task.TaskInfo) error) (retErr error)
- func (c APIClient) ListTransaction() ([]*transaction.TransactionInfo, error)
- func (c APIClient) ModifyClusterRoleBinding(principal string, roles []string) error
- func (c APIClient) ModifyProjectRepoRoleBinding(projectName, repoName, principal string, roles []string) error
- func (c APIClient) ModifyProjectRoleBinding(projectName, principal string, roles []string) error
- func (c APIClient) ModifyRepoRoleBinding(repoName, principal string, roles []string) errordeprecated
- func (c APIClient) NewCreateFileSetClient() (_ *CreateFileSetClient, retErr error)
- func (c APIClient) NewModifyFileClient(commit *pfs.Commit) (_ *ModifyFileClient, retErr error)
- func (c APIClient) Profile(profile *debug.Profile, filter *debug.Filter, w io.Writer) (retErr error)
- func (c APIClient) PutFile(commit *pfs.Commit, path string, r io.Reader, opts ...PutFileOption) error
- func (c APIClient) PutFileTAR(commit *pfs.Commit, r io.Reader, opts ...PutFileOption) error
- func (c APIClient) PutFileURL(commit *pfs.Commit, path, url string, recursive bool, opts ...PutFileOption) error
- func (c APIClient) RenewFileSet(ID string, ttl time.Duration) (retErr error)
- func (c APIClient) RestartDatum(pipelineName string, jobID string, datumFilter []string) errordeprecated
- func (c APIClient) RestartProjectDatum(projectName, pipelineName, jobID string, datumFilter []string) error
- func (c APIClient) RunBatchInTransaction(cb func(builder *TransactionBuilder) error) (*transaction.TransactionInfo, error)
- func (c APIClient) RunCron(pipelineName string) errordeprecated
- func (c APIClient) RunPipeline(pipelineName string, provenance []*pfs.Commit, jobID string) errordeprecated
- func (c APIClient) RunProjectCron(projectName, pipelineName string) error
- func (c APIClient) RunProjectPipeline(projectName, pipelineName string, provenance []*pfs.Commit, jobID string) error
- func (c *APIClient) SetAuthToken(token string)
- func (c APIClient) ShardFileSet(ID string) (_ []*pfs.PathRange, retErr error)
- func (c APIClient) SquashCommitSet(id string) error
- func (c APIClient) StartCommit(repoName string, branchName string) (_ *pfs.Commit, retErr error)deprecated
- func (c APIClient) StartCommitParent(repoName, branchName, parentBranch, parentCommit string) (*pfs.Commit, error)deprecated
- func (c APIClient) StartPipeline(pipelineName string) errordeprecated
- func (c APIClient) StartProjectCommit(projectName, repoName string, branchName string) (_ *pfs.Commit, retErr error)
- func (c APIClient) StartProjectCommitParent(projectName, repoName, branchName, parentBranch, parentCommit string) (*pfs.Commit, error)
- func (c APIClient) StartProjectPipeline(projectName, pipelineName string) error
- func (c APIClient) StartTransaction() (*transaction.Transaction, error)
- func (c APIClient) StopJob(pipelineName string, jobID string) errordeprecated
- func (c APIClient) StopPipeline(pipelineName string) errordeprecated
- func (c APIClient) StopProjectJob(projectName, pipelineName, jobID string) error
- func (c APIClient) StopProjectPipeline(projectName, pipelineName string) error
- func (c APIClient) SubscribeCommit(repo *pfs.Repo, branchName string, from string, state pfs.CommitState, ...) (retErr error)
- func (c APIClient) SubscribeJob(pipelineName string, details bool, cb func(*pps.JobInfo) error) errordeprecated
- func (c APIClient) SubscribeProjectJob(projectName, pipelineName string, details bool, cb func(*pps.JobInfo) error) error
- func (c APIClient) UpdateProject(projectName, description string) error
- func (c APIClient) UpdateProjectRepo(projectName, repoName string) error
- func (c APIClient) UpdateRepo(repoName string) errordeprecated
- func (c APIClient) Version() (string, error)
- func (c APIClient) WaitCommit(repoName, branchName, commitID string) (_ *pfs.CommitInfo, retErr error)deprecated
- func (c APIClient) WaitCommitSet(id string, cb func(*pfs.CommitInfo) error) (retErr error)
- func (c APIClient) WaitCommitSetAll(id string) (_ []*pfs.CommitInfo, retErr error)
- func (c APIClient) WaitJob(pipelineName string, jobID string, details bool) (_ *pps.JobInfo, retErr error)
- func (c APIClient) WaitJobSet(id string, details bool, cb func(*pps.JobInfo) error) (retErr error)
- func (c APIClient) WaitJobSetAll(id string, details bool) (_ []*pps.JobInfo, retErr error)
- func (c APIClient) WaitProjectCommit(projectName, repoName, branchName, commitID string) (_ *pfs.CommitInfo, retErr error)
- func (c APIClient) WaitProjectJob(projectName, pipelineName, jobID string, details bool) (_ *pps.JobInfo, retErr error)
- func (c APIClient) WalkFile(commit *pfs.Commit, path string, cb func(*pfs.FileInfo) error) (retErr error)
- func (c APIClient) WithCreateFileSetClient(cb func(ModifyFile) error) (resp *pfs.CreateFileSetResponse, retErr error)
- func (c *APIClient) WithCtx(ctx context.Context) *APIClient
- func (c APIClient) WithDefaultTransformImage(x string) *APIClient
- func (c APIClient) WithDefaultTransformUser(x string) *APIClient
- func (c APIClient) WithModifyFileClient(commit *pfs.Commit, cb func(ModifyFile) error) (retErr error)
- func (c APIClient) WithRenewer(cb func(context.Context, *renew.StringSet) error) error
- func (c APIClient) WithTransaction(txn *transaction.Transaction) *APIClient
- func (c APIClient) WithoutTransaction() *APIClient
- type AdminAPIClient
- type AuthAPIClient
- type CopyFileOption
- type CreateFileSetClient
- func (ctfsc *CreateFileSetClient) Close() (*pfs.CreateFileSetResponse, error)
- func (mfc *CreateFileSetClient) CopyFile(dst string, src *pfs.File, opts ...CopyFileOption) error
- func (mfc *CreateFileSetClient) DeleteFile(path string, opts ...DeleteFileOption) error
- func (mfc *CreateFileSetClient) PutFile(path string, r io.Reader, opts ...PutFileOption) error
- func (mfc *CreateFileSetClient) PutFileTAR(r io.Reader, opts ...PutFileOption) error
- func (mfc *CreateFileSetClient) PutFileURL(path, url string, recursive bool, opts ...PutFileOption) error
- type DebugClient
- type DeleteFileOption
- type FindCommitsResponse
- type FsckOption
- type GetFileOption
- type IdentityAPIClient
- type LogsIter
- type ModifyFile
- type ModifyFileClient
- func (mfc *ModifyFileClient) Close() error
- func (mfc *ModifyFileClient) CopyFile(dst string, src *pfs.File, opts ...CopyFileOption) error
- func (mfc *ModifyFileClient) DeleteFile(path string, opts ...DeleteFileOption) error
- func (mfc *ModifyFileClient) PutFile(path string, r io.Reader, opts ...PutFileOption) error
- func (mfc *ModifyFileClient) PutFileTAR(r io.Reader, opts ...PutFileOption) error
- func (mfc *ModifyFileClient) PutFileURL(path, url string, recursive bool, opts ...PutFileOption) error
- type Option
- func WithAdditionalPachdCert() Option
- func WithAdditionalRootCAs(pemBytes []byte) Option
- func WithAdditionalStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) Option
- func WithAdditionalUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) Option
- func WithCertPool(pool *x509.CertPool) Option
- func WithDialTimeout(t time.Duration) Option
- func WithGZIPCompression() Option
- func WithMaxConcurrentStreams(streams int) Option
- func WithRootCAs(path string) Option
- type PfsAPIClient
- type PortForwarder
- func (f *PortForwarder) Close()
- func (f *PortForwarder) Run(appName string, localPort, remotePort uint16, selectors ...string) (uint16, error)
- func (f *PortForwarder) RunForConsole(localPort, remotePort uint16) (uint16, error)
- func (f *PortForwarder) RunForEnterpriseServer(localPort, remotePort uint16) (uint16, error)
- func (f *PortForwarder) RunForPachd(localPort, remotePort uint16) (uint16, error)
- type PpsAPIClient
- type ProxyClient
- type PutFileOption
- type TransactionAPIClient
- type TransactionBuilder
- type VersionAPIClient
Constants ¶
const ( // MaxListItemsLog specifies the maximum number of items we log in response to a List* API MaxListItemsLog = 10 // StorageSecretName is the name of the Kubernetes secret in which storage credentials are stored. StorageSecretName = "pachyderm-storage-secret" // PostgresSecretName is the name of the secret containing the postgres password // It must match the secret passed to pachd here: etc/helm/pachyderm/templates/pachd/deployment.yaml PostgresSecretName = "postgres" // PachctlSecretName is the name of the Kubernetes secret in which // pachctl credentials are stored. PachctlSecretName = "pachyderm-pachctl-secret" )
const ( // PPSEtcdPrefixEnv is the environment variable that specifies the etcd // prefix that PPS uses. PPSEtcdPrefixEnv = "PPS_ETCD_PREFIX" // PPSWorkerIPEnv is the environment variable that a worker can use to // see its own IP. The IP address is made available through the // Kubernetes downward API. PPSWorkerIPEnv = "PPS_WORKER_IP" // PPSPodNameEnv is the environment variable that a pod can use to // see its own name. The pod name is made available through the // Kubernetes downward API. PPSPodNameEnv = "PPS_POD_NAME" // PPSProjectNameEnv is the env var that sets the name of the project // that the workers are running. PPSProjectNameEnv = "PPS_PROJECT_NAME" // PPSPipelineNameEnv is the env var that sets the name of the pipeline // that the workers are running. PPSPipelineNameEnv = "PPS_PIPELINE_NAME" // PPSJobIDEnv is the env var that sets the ID of the job that the // workers are running (if the workers belong to an orphan job, rather than a // pipeline). PPSJobIDEnv = "PPS_JOB_ID" // PPSSpecCommitEnv is the namespace in which pachyderm is deployed PPSSpecCommitEnv = "PPS_SPEC_COMMIT" // PPSInputPrefix is the prefix of the path where datums are downloaded // to. A datum of an input named `XXX` is downloaded to `/pfs/XXX/`. PPSInputPrefix = "/pfs" // PPSScratchSpace is where pps workers store data while it's waiting to be // processed. PPSScratchSpace = ".scratch" // PPSWorkerPortEnv is environment variable name for the port that workers // use for their gRPC server PPSWorkerPortEnv = "PPS_WORKER_GRPC_PORT" // PPSWorkerVolume is the name of the volume in which workers store // data. PPSWorkerVolume = "pachyderm-worker" // PPSWorkerUserContainerName is the name of the container that runs // the user code to process data. PPSWorkerUserContainerName = "user" // PPSWorkerSidecarContainerName is the name of the sidecar container // that runs alongside of each worker container. PPSWorkerSidecarContainerName = "storage" // GCGenerationKey is the etcd key that stores a counter that the // GC utility increments when it runs, so as to invalidate all cache. GCGenerationKey = "gc-generation" // JobIDEnv is an env var that is added to the environment of user pipeline // code and indicates the id of the job currently being run. JobIDEnv = "PACH_JOB_ID" // OutputCommitIDEnv is an env var that is added to the environment of user // pipelined code and indicates the id of the output commit. OutputCommitIDEnv = "PACH_OUTPUT_COMMIT_ID" // DatumIDEnv is an env var that is added to the environment of user // pipelined code and indicates the id of the datum. DatumIDEnv = "PACH_DATUM_ID" // PeerPortEnv is the env var that sets a custom peer port PeerPortEnv = "PEER_PORT" ReprocessSpecUntilSuccess = "until_success" ReprocessSpecEveryJob = "every_job" )
const DefaultDialTimeout = 30 * time.Second
DefaultDialTimeout is the max amount of time APIClient.connect() will wait for a connection to be established unless overridden by WithDialTimeout()
const DefaultMaxConcurrentStreams = 100
DefaultMaxConcurrentStreams defines the max number of Putfiles or Getfiles happening simultaneously
const DefaultTTL = 10 * time.Minute
DefaultTTL is the default time-to-live for a temporary fileset.
const FileSetsRepoName = "__filesets__"
FileSetsRepoName is the repo name used to access filesets as virtual commits.
Variables ¶
This section is empty.
Functions ¶
func DefaultDialOptions ¶
func DefaultDialOptions() []grpc.DialOption
DefaultDialOptions is a helper returning a slice of grpc.Dial options such that grpc.Dial() is synchronous: the call doesn't return until the connection has been established and it's safe to send RPCs
func GetDatumTotalTime ¶
func GetDatumTotalTime(s *pps.ProcessStats) time.Duration
GetDatumTotalTime sums the timing stats from a DatumInfo
func GetTransaction ¶
func GetTransaction(ctx context.Context) (*transaction.Transaction, error)
GetTransaction (should be run from the server-side) loads the active transaction from the grpc metadata and returns the associated transaction object - or `nil` if no transaction is set.
func GetUserMachineAddr ¶
func GetUserMachineAddr(context *config.Context) (addr *grpcutil.PachdAddress, err error)
func NewCommitSet ¶
NewCommitSet creates a pfs.CommitSet
func NewCronInput ¶
NewCronInput returns an input which will trigger based on a timed schedule. It uses cron syntax to specify the schedule. The input will be exposed to jobs as `/pfs/<name>/<timestamp>`. The timestamp uses the RFC 3339 format, e.g. `2006-01-02T15:04:05Z07:00`. It only takes required options.
func NewCronInputOpts ¶
func NewCronInputOpts(name string, repo string, spec string, overwrite bool, start *types.Timestamp) *pps.Input
NewCronInputOpts returns an input which will trigger based on a timed schedule. It uses cron syntax to specify the schedule. The input will be exposed to jobs as `/pfs/<name>/<timestamp>`. The timestamp uses the RFC 3339 format, e.g. `2006-01-02T15:04:05Z07:00`. It includes all the options.
func NewCrossInput ¶
NewCrossInput returns an input which is the cross product of other inputs. That means that all combination of datums will be seen by the job / pipeline.
func NewGroupInput ¶
NewGroupInput returns an input which groups the inputs by the GroupBy pattern. That means that it will return a datum for each group of input datums matching a particular GroupBy pattern
func NewJobInput
deprecated
func NewJoinInput ¶
NewJoinInput returns an input which is the join of other inputs. That means that all combination of datums which match on `joinOn` will be seen by the job / pipeline.
func NewPFSInput
deprecated
func NewPipeline
deprecated
func NewProjectBranch ¶
NewProjectBranch creates a pfs.Branch in the given project & repo.
func NewProjectCommit ¶
NewProjectCommit creates a pfs.Commit in the given project, repo & branch.
func NewProjectFile ¶
NewProjectFile creates a pfs.File.
func NewProjectJob ¶
NewProjectJob creates a pps.Job.
func NewProjectJobInput ¶
NewProjectJobInput creates a pps.JobInput.
func NewProjectPFSInput ¶
NewProjectPFSInput returns a new PFS input. It only includes required options.
func NewProjectPFSInputOpts ¶
func NewProjectPFSInputOpts(name, project, repo, branch, glob, joinOn, groupBy string, outerJoin, lazy bool, trigger *pfs.Trigger) *pps.Input
NewProjectPFSInputOpts returns a new PFS input. It includes all options.
func NewProjectPipeline ¶
NewProjectPipeline creates a pps.Pipeline.
func NewProjectRepo ¶
func NewProjectS3PFSInput ¶
NewProjectS3PFSInput returns a new PFS input with 'S3' set.
func NewProxyPostgresListener ¶
func NewProxyPostgresListener(clientFactory func() (proxy.APIClient, error)) col.PostgresListener
func NewS3PFSInput
deprecated
func NewSystemProjectRepo ¶
NewSystemProjectRepo creates a pfs.Repo of the given type in the given project.
func NewSystemRepo
deprecated
func NewUnionInput ¶
NewUnionInput returns an input which is the union of other inputs. That means that all datums from any of the inputs will be seen individually by the job / pipeline.
func WithSystemCAs ¶
func WithSystemCAs(settings *clientSettings) error
WithSystemCAs uses the system certs for client creation, if no others are provided. This is the default behaviour when the scheme is `https` or `grpcs`.
Types ¶
type APIClient ¶
type APIClient struct { PfsAPIClient PpsAPIClient AuthAPIClient IdentityAPIClient VersionAPIClient AdminAPIClient TransactionAPIClient DebugClient ProxyClient Enterprise enterprise.APIClient // not embedded--method name conflicts with AuthAPIClient License license.APIClient // contains filtered or unexported fields }
An APIClient is a wrapper around pfs, pps and block APIClients.
func NewEnterpriseClientForTest ¶
NewEnterpriseClientForTest constructs a new APIClient for tests. TODO(actgardner): this should probably live in testutils and accept a testing.TB
func NewEnterpriseClientOnUserMachine ¶
NewEnterpriseClientOnUserMachine constructs a new APIClient using $HOME/.pachyderm/config if it exists. This is intended to be used in the pachctl binary to communicate with the enterprise server.
func NewEnterpriseClientOnUserMachineContext ¶
func NewEnterpriseClientOnUserMachineContext(ctx context.Context, prefix string, options ...Option) (*APIClient, error)
NewEnterpriseClientOnUserMachineContext is like NewEnterpriseClientOnUserMachine, but accepts a context for dialing and future RPCs.
func NewForTest ¶
NewForTest constructs a new APIClient for tests. TODO(actgardner): this should probably live in testutils and accept a testing.TB
func NewFromPachdAddress
deprecated
func NewFromPachdAddress(pachdAddress *grpcutil.PachdAddress, options ...Option) (*APIClient, error)
NewFromPachdAddress creates a new client given a parsed GRPC address.
Deprecated: Use NewFromPachdAddressContext.
func NewFromPachdAddressContext ¶
func NewFromPachdAddressContext(ctx context.Context, pachdAddress *grpcutil.PachdAddress, options ...Option) (*APIClient, error)
NewFromPachdAddressContext is like NewFromPachdAddress, but accepts a context to use for dialing and future RPCs.
func NewFromURI
deprecated
func NewFromURIContext ¶
NewFromURIContext creates a new client given a GRPC URI ex. grpc://test.example.com. If no scheme is specified `grpc://` is assumed. A scheme of `grpcs://` enables TLS.
func NewInCluster
deprecated
func NewInClusterContext ¶
NewInClusterContext constructs a new APIClient using env vars that Kubernetes creates. This should be used to access Pachyderm from within a Kubernetes cluster with Pachyderm running on it.
func NewInWorker
deprecated
func NewInWorkerContext ¶
NewInWorker constructs a new APIClient intended to be used from a worker to talk to the sidecar pachd container
func NewOnUserMachine
deprecated
func NewOnUserMachineContext ¶
func NewOnUserMachineContext(ctx context.Context, prefix string, options ...Option) (*APIClient, error)
NewOnUserMachineContext is like NewOnUserMachine, but accepts a context for dialing and future RPCs.
func (APIClient) AddFileSet
deprecated
func (*APIClient) AddMetadata ¶
AddMetadata adds necessary metadata (including authentication credentials) to the context 'ctx', preserving any metadata that is present in either the incoming or outgoing metadata of 'ctx'.
func (APIClient) AddProjectFileSet ¶
AddProjectFileSet adds a fileset to a commit in a project.
func (APIClient) ClearProjectCommit ¶
func (c APIClient) ClearProjectCommit(projectName, repoName, branchName, commitID string) (retErr error)
ClearProjectCommit clears the state of an open commit.
func (*APIClient) ClientContextName ¶
ClientContextName returns the name of the context in the client config that produced this client, or an empty string if the client was not produced from a configured client context.
func (APIClient) ComposeFileSet ¶
ComposeFileSet composes a file set from a list of file sets.
func (APIClient) CopyFile ¶
func (c APIClient) CopyFile(dstCommit *pfs.Commit, dstPath string, srcCommit *pfs.Commit, srcPath string, opts ...CopyFileOption) error
CopyFile copies a file from one PFS location to another. It can be used on directories or regular files.
func (APIClient) CreateBranchTrigger
deprecated
func (c APIClient) CreateBranchTrigger(repoName string, branchName string, commitBranch string, commitID string, trigger *pfs.Trigger) error
CreateBranchTrigger Creates a branch with a trigger. Note: triggers and provenance are mutually exclusive. See the docs on triggers to learn more about why this is.
Deprecated: use CreateProjectBranchTrigger instead.
func (APIClient) CreatePipeline
deprecated
func (c APIClient) CreatePipeline(pipelineName, image string, cmd []string, stdin []string, parallelismSpec *pps.ParallelismSpec, input *pps.Input, outputBranch string, update bool) error
CreatePipeline creates a new pipeline, pipelines are the main computation object in PPS they create a flow of data from a set of input Repos to an output Repo (which has the same name as the pipeline). Whenever new data is committed to one of the input repos the pipelines will create jobs to bring the output Repo up to data.
image is the Docker image to run the jobs in.
cmd is the command passed to the Docker run invocation. NOTE as with Docker cmd is not run inside a shell that means that things like wildcard globbing (*), pipes (|) and file redirects (> and >>) will not work. To get that behavior you should have your command be a shell of your choice and pass a shell script to stdin.
stdin is a slice of lines that are sent to your command on stdin. Lines need not end in newline characters.
parallelism is how many copies of your container should run in parallel. You may pass 0 for parallelism in which case PPS will set the parallelism based on available resources.
input specifies a set of Repos that will be visible to the jobs during runtime. commits to these repos will cause the pipeline to create new jobs to process them. update indicates that you want to update an existing pipeline.
Deprecated: use CreateProjectPipeline instead.
func (APIClient) CreatePipelineService
deprecated
func (c APIClient) CreatePipelineService(pipelineName, image string, cmd, stdin []string, parallelismSpec *pps.ParallelismSpec, input *pps.Input, update bool, internalPort, externalPort int32, annotations map[string]string) error
CreatePipelineService creates a new pipeline service.
Deprecated: use CreateProjectPipelineService instead.
func (APIClient) CreateProject ¶
CreateProject creates a new Project object in pfs with the given name.
func (APIClient) CreateProjectBranch ¶
func (c APIClient) CreateProjectBranch(projectName, repoName, branchName, commitBranch, commitID string, provenance []*pfs.Branch) error
CreateProjectBranch creates a new branch
func (APIClient) CreateProjectBranchTrigger ¶
func (c APIClient) CreateProjectBranchTrigger(projectName, repoName, branchName, commitBranch, commitID string, trigger *pfs.Trigger) error
CreateProjectBranchTrigger creates a branch with a trigger. Note: triggers and provenance are mutually exclusive. See the docs on triggers to learn more about why this is.
func (APIClient) CreateProjectPipeline ¶
func (c APIClient) CreateProjectPipeline(projectName, pipelineName, image string, cmd []string, stdin []string, parallelismSpec *pps.ParallelismSpec, input *pps.Input, outputBranch string, update bool) error
CreatePipeline creates a new pipeline, pipelines are the main computation object in PPS they create a flow of data from a set of input Repos to an output Repo (which has the same name as the pipeline). Whenever new data is committed to one of the input repos the pipelines will create jobs to bring the output Repo up to data.
image is the Docker image to run the jobs in.
cmd is the command passed to the Docker run invocation. NOTE as with Docker cmd is not run inside a shell that means that things like wildcard globbing (*), pipes (|) and file redirects (> and >>) will not work. To get that behavior you should have your command be a shell of your choice and pass a shell script to stdin.
stdin is a slice of lines that are sent to your command on stdin. Lines need not end in newline characters.
parallelism is how many copies of your container should run in parallel. You may pass 0 for parallelism in which case PPS will set the parallelism based on available resources.
input specifies a set of Repos that will be visible to the jobs during runtime. commits to these repos will cause the pipeline to create new jobs to process them. update indicates that you want to update an existing pipeline.
func (APIClient) CreateProjectPipelineService ¶
func (c APIClient) CreateProjectPipelineService(projectName, pipelineName, image string, cmd, stdin []string, parallelismSpec *pps.ParallelismSpec, input *pps.Input, update bool, internalPort, externalPort int32, annotations map[string]string) error
CreateProjectPipelineService creates a new pipeline service.
func (APIClient) CreateProjectRepo ¶
CreateProjectRepo creates a new Repo object in pfs with the given name. Repos are the top level data object in pfs and should be used to store data of a similar type. For example rather than having a single Repo for an entire project you might have separate Repos for logs, metrics, database dumps etc.
func (APIClient) CreateRepo
deprecated
CreateRepo creates a new Repo object in pfs with the given name. Repos are the top level data object in pfs and should be used to store data of a similar type. For example rather than having a single Repo for an entire project you might have separate Repos for logs, metrics, database dumps etc.
Deprecated: use CreateProjectRepo instead.
func (APIClient) CreateSecret ¶
CreateSecret creates a secret on the cluster.
func (*APIClient) Ctx ¶
Ctx is a convenience function that returns adds Pachyderm authn metadata to context.Background().
func (APIClient) DeleteAll ¶
DeleteAll deletes everything in the cluster. Use with caution, there is no undo. TODO: rewrite this to use transactions
func (APIClient) DeleteAllEnterprise ¶
DeleteAllEnterprise deletes everything in the enterprise server. Use with caution, there is no undo. TODO: rewrite this to use transactions
func (APIClient) DeleteBranch
deprecated
DeleteBranch deletes a branch, but leaves the commits themselves intact. In other words, those commits can still be accessed via commit IDs and other branches they happen to be on.
Deprecated: use DeleteProjectBranch instead.
func (APIClient) DeleteFile ¶
DeleteFile deletes a file from PFS.
func (APIClient) DeletePipeline
deprecated
func (APIClient) DeleteProject ¶
DeleteProject deletes a project.
If "force" is set to true, the project will be removed regardless of errors. This argument should be used with care.
func (APIClient) DeleteProjectBranch ¶
DeleteProjectBranch deletes a branch, but leaves the commits themselves intact. In other words, those commits can still be accessed via commit IDs and other branches they happen to be on.
func (APIClient) DeleteProjectJob ¶
DeleteProjectJob deletes a job.
func (APIClient) DeleteProjectPipeline ¶
DeleteProjectPipeline deletes a pipeline along with its output Repo.
func (APIClient) DeleteProjectRepo ¶
DeleteProjectRepo deletes a repo and reclaims the storage space it was using. Note that as of 1.0 we do not reclaim the blocks that the Repo was referencing, this is because they may also be referenced by other Repos and deleting them would make those Repos inaccessible. This will be resolved in later versions.
If "force" is set to true, the repo will be removed regardless of errors. This argument should be used with care.
func (APIClient) DeleteRepo
deprecated
DeleteRepo deletes a repo and reclaims the storage space it was using. Note that as of 1.0 we do not reclaim the blocks that the Repo was referencing, this is because they may also be referenced by other Repos and deleting them would make those Repos inaccessible. This will be resolved in later versions.
If "force" is set to true, the repo will be removed regardless of errors. This argument should be used with care.
Deprecated: use DeleteProjectRepo instead.
func (APIClient) DeleteSecret ¶
DeleteSecret deletes a secret from the cluster.
func (APIClient) DeleteTransaction ¶
func (c APIClient) DeleteTransaction(txn *transaction.Transaction) error
DeleteTransaction is an RPC that aborts an existing transaction in the Pachyderm cluster and removes it from the cluster.
func (APIClient) DiffFile ¶
func (c APIClient) DiffFile(newCommit *pfs.Commit, newPath string, oldCommit *pfs.Commit, oldPath string, shallow bool, cb func(*pfs.FileInfo, *pfs.FileInfo) error) (retErr error)
DiffFile returns the differences between 2 paths at 2 commits. It streams back one file at a time which is either from the new path, or the old path
func (APIClient) DiffFileAll ¶
func (c APIClient) DiffFileAll(newCommit *pfs.Commit, newPath string, oldCommit *pfs.Commit, oldPath string, shallow bool) (_ []*pfs.FileInfo, _ []*pfs.FileInfo, retErr error)
DiffFileAll returns the differences between 2 paths at 2 commits.
func (APIClient) DropCommitSet ¶
DropCommitSet drop the commits of a CommitSet and all data included in those commits.
func (APIClient) ExecuteInTransaction ¶
func (c APIClient) ExecuteInTransaction(f func(c *APIClient) error) (*transaction.TransactionInfo, error)
ExecuteInTransaction executes a callback within a transaction. The callback should use the passed in APIClient. If the callback returns a nil error, then the transaction will be finished. If the callback returns a non-nil error, then the transaction will be deleted.
func (APIClient) FindCommits ¶
func (c APIClient) FindCommits(req *pfs.FindCommitsRequest) (*FindCommitsResponse, error)
FindCommits searches for commits that reference a supplied file being modified in a branch.
func (APIClient) FinishCommit
deprecated
FinishCommit ends the process of committing data to a Repo and persists the Commit. Once a Commit is finished the data becomes immutable and future attempts to write to it with PutFile will error.
Deprecated: use FinishProjectCommit instead.
func (APIClient) FinishProjectCommit ¶
func (c APIClient) FinishProjectCommit(projectName, repoName, branchName, commitID string) (retErr error)
FinishProjectCommit ends the process of committing data to a Repo and persists the Commit. Once a Commit is finished the data becomes immutable and future attempts to write to it with PutFile will error.
func (APIClient) FinishTransaction ¶
func (c APIClient) FinishTransaction(txn *transaction.Transaction) (*transaction.TransactionInfo, error)
FinishTransaction is an RPC that closes an existing transaction in the Pachyderm cluster and commits its changes to the persisted cluster metadata transactionally.
func (APIClient) Fsck ¶
func (c APIClient) Fsck(fix bool, cb func(*pfs.FsckResponse) error, opts ...FsckOption) error
Fsck performs checks on pfs. Errors that are encountered will be passed onError. These aren't errors in the traditional sense, in that they don't prevent the completion of fsck. Errors that do prevent completion will be returned from the function.
func (APIClient) FsckFastExit ¶
FsckFastExit performs checks on pfs, similar to Fsck, except that it returns the first fsck error it encounters and exits.
func (*APIClient) GetAddress ¶
func (c *APIClient) GetAddress() *grpcutil.PachdAddress
GetAddress returns the pachd host:port with which 'c' is communicating. If 'c' was created using NewInCluster or NewOnUserMachine then this is how the address may be retrieved from the environment.
func (APIClient) GetClusterRoleBinding ¶
func (c APIClient) GetClusterRoleBinding() (*auth.RoleBinding, error)
func (APIClient) GetFile ¶
func (c APIClient) GetFile(commit *pfs.Commit, path string, w io.Writer, opts ...GetFileOption) (retErr error)
GetFile returns the contents of a file at a specific Commit. offset specifies a number of bytes that should be skipped in the beginning of the file. size limits the total amount of data returned, note you will get fewer bytes than size if you pass a value larger than the size of the file. If size is set to 0 then all of the data will be returned.
func (APIClient) GetFileReadSeeker ¶
GetFileReadSeeker returns a reader for the contents of a file at a specific Commit that permits Seeking to different points in the file.
func (APIClient) GetFileReader ¶
GetFileReader gets a reader for the specified path TODO: This should probably be an io.ReadCloser so we can close the rpc if the full file isn't read.
func (APIClient) GetFileSet
deprecated
func (APIClient) GetFileTAR ¶
GetFileTAR gets a tar file from PFS.
func (APIClient) GetFileURL ¶
GetFileURL gets the file at the specified URL
func (APIClient) GetLogs
deprecated
func (c APIClient) GetLogs(pipelineName, jobID string, data []string, datumID string, master, follow bool, since time.Duration) *LogsIter
GetLogs gets logs from a job (logs includes stdout and stderr). 'pipelineName', 'jobID', 'data', and 'datumID', are all filters. To forego any filter, simply pass an empty value, though one of 'pipelineName' and 'jobID' must be set. Responses are written to 'messages'.
Deprecated: use GetProjectLogs instead.
func (APIClient) GetLogsLoki ¶
func (c APIClient) GetLogsLoki( pipelineName string, jobID string, data []string, datumID string, master bool, follow bool, since time.Duration, ) *LogsIter
GetLogsLoki gets logs from a job (logs includes stdout and stderr). 'pipelineName', 'jobID', 'data', and 'datumID', are all filters. To forego any filter, simply pass an empty value, though one of 'pipelineName' and 'jobID' must be set. Responses are written to 'messages'.
func (APIClient) GetProjectFileSet ¶
GetProjectFileSet gets a file set for a commit in a project.
func (APIClient) GetProjectLogs ¶
func (c APIClient) GetProjectLogs(projectName, pipelineName, jobID string, data []string, datumID string, master, follow bool, since time.Duration) *LogsIter
GetProjectLogs gets logs from a job (logs includes stdout and stderr). 'pipelineName', 'jobID', 'data', and 'datumID', are all filters. To forego any filter, simply pass an empty value, though one of 'pipelineName' and 'jobID' must be set. Responses are written to 'messages'.
func (APIClient) GetProjectLogsLoki ¶
func (c APIClient) GetProjectLogsLoki(projectName, pipelineName, jobID string, data []string, datumID string, master, follow bool, since time.Duration) *LogsIter
GetProjectLogsLoki gets logs from a job (logs includes stdout and stderr). 'pipelineName', 'jobID', 'data', and 'datumID', are all filters. To forego any filter, simply pass an empty value, though one of 'pipelineName' and 'jobID' must be set. Responses are written to 'messages'.
func (APIClient) GetProjectRepoRoleBinding ¶
func (c APIClient) GetProjectRepoRoleBinding(projectName, repoName string) (*auth.RoleBinding, error)
Return the roles bound to a repo within a project.
func (APIClient) GetProjectRoleBinding ¶
func (c APIClient) GetProjectRoleBinding(project string) (*auth.RoleBinding, error)
func (APIClient) GetRepoRoleBinding
deprecated
func (c APIClient) GetRepoRoleBinding(repoName string) (*auth.RoleBinding, error)
Deprecated: use GetProjectRepoRoleBinding instead.
func (APIClient) GetTransaction ¶
func (c APIClient) GetTransaction() (*transaction.Transaction, error)
GetTransaction is a helper function to get the active transaction from the client's context metadata.
func (APIClient) GlobFile ¶
func (c APIClient) GlobFile(commit *pfs.Commit, pattern string, cb func(fi *pfs.FileInfo) error) (retErr error)
GlobFile returns files that match a given glob pattern in a given commit, calling cb with each FileInfo. The pattern is documented here: https://golang.org/pkg/path/filepath/#Match
func (APIClient) GlobFileAll ¶
func (c APIClient) GlobFileAll(commit *pfs.Commit, pattern string) (_ []*pfs.FileInfo, retErr error)
GlobFileAll returns files that match a given glob pattern in a given commit. The pattern is documented here: https://golang.org/pkg/path/filepath/#Match
func (APIClient) InspectBranch
deprecated
func (APIClient) InspectCluster ¶
func (c APIClient) InspectCluster() (*admin.ClusterInfo, error)
InspectCluster retrieves cluster state
func (APIClient) InspectClusterWithVersion ¶
InspectCluster retrieves cluster state, and sends the server its version for the server to validate.
func (APIClient) InspectCommit
deprecated
func (c APIClient) InspectCommit(repoName, branchName, commitID string) (_ *pfs.CommitInfo, retErr error)
InspectCommit returns info about a specific Commit.
Deprecated: use InspectProjectCommit instead.
func (APIClient) InspectCommitSet ¶
func (c APIClient) InspectCommitSet(id string) (_ []*pfs.CommitInfo, retErr error)
InspectCommitSet returns info about a specific CommitSet.
func (APIClient) InspectFile ¶
InspectFile returns metadata about the specified file
func (APIClient) InspectJob
deprecated
func (APIClient) InspectJobSet ¶
func (APIClient) InspectPipeline
deprecated
func (APIClient) InspectProject ¶
func (c APIClient) InspectProject(name string) (*pfs.ProjectInfo, error)
InspectProject returns info about a specific Project.
func (APIClient) InspectProjectBranch ¶
func (c APIClient) InspectProjectBranch(projectName, repoName string, branchName string) (*pfs.BranchInfo, error)
InspectProjectBranch returns information on a specific PFS branch.
func (APIClient) InspectProjectCommit ¶
func (c APIClient) InspectProjectCommit(projectName, repoName, branchName, commitID string) (_ *pfs.CommitInfo, retErr error)
InspectProjectCommit returns info about a specific Commit.
func (APIClient) InspectProjectDatum ¶
func (c APIClient) InspectProjectDatum(projectName, pipelineName, jobID, datumID string) (*pps.DatumInfo, error)
InspectProjectDatum returns info about a single datum.
func (APIClient) InspectProjectJob ¶
func (c APIClient) InspectProjectJob(projectName, pipelineName, jobID string, details bool) (_ *pps.JobInfo, retErr error)
InspectProjectJob returns info about a specific job.
'details' indicates that the JobInfo.Details field should be filled out.
func (APIClient) InspectProjectPipeline ¶
func (c APIClient) InspectProjectPipeline(projectName, pipelineName string, details bool) (*pps.PipelineInfo, error)
InspectProjectPipeline returns info about a specific pipeline. The name may include ancestry syntax or be a bare name.
func (APIClient) InspectProjectRepo ¶
InspectProjectRepo returns info about a specific Repo.
func (APIClient) InspectSecret ¶
func (c APIClient) InspectSecret(secret string) (*pps.SecretInfo, error)
InspectSecret returns info about a specific secret.
func (APIClient) InspectTransaction ¶
func (c APIClient) InspectTransaction(txn *transaction.Transaction) (*transaction.TransactionInfo, error)
InspectTransaction is an RPC that fetches the detailed information for an existing transaction in the Pachyderm cluster.
func (APIClient) IsAuthActive ¶
IsAuthActive returns whether auth is activated on the cluster
func (APIClient) ListBranch
deprecated
func (c APIClient) ListBranch(repoName string) ([]*pfs.BranchInfo, error)
ListBranch lists the active branches on a Repo.
Deprecated: use ListProjectBranch instead.
func (APIClient) ListCommit ¶
func (c APIClient) ListCommit(repo *pfs.Repo, to, from *pfs.Commit, number int64) ([]*pfs.CommitInfo, error)
ListCommit lists commits. If only `repo` is given, all commits in the repo are returned. If `to` is given, only the ancestors of `to`, including `to` itself, are considered. If `from` is given, only the descendents of `from`, including `from` itself, are considered. If `to` and `from` are the same commit, no commits will be returned. `number` determines how many commits are returned. If `number` is 0, all commits that match the aforementioned criteria are returned.
func (APIClient) ListCommitByRepo ¶
ListCommitByRepo lists all commits in a repo.
func (APIClient) ListCommitF ¶
func (c APIClient) ListCommitF(repo *pfs.Repo, to, from *pfs.Commit, number int64, reverse bool, f func(*pfs.CommitInfo) error) error
ListCommitF lists commits, calling f with each commit. If only `repo` is given, all commits in the repo are returned. If `to` is given, only the ancestors of `to`, including `to` itself, are considered. If `from` is given, only the descendents of `from`, including `from` itself, are considered. If `to` and `from` are the same commit, no commits will be returned. `number` determines how many commits are returned. If `number` is 0, `reverse` lists the commits from oldest to newest, rather than newest to oldest all commits that match the aforementioned criteria are passed to f.
func (APIClient) ListDatumInput ¶
ListDatumInput returns info about datums for a pipeline with input. The pipeline doesn't need to exist.
func (APIClient) ListDatumInputAll ¶
ListDatumInputAll returns info about datums for a pipeline with input. The pipeline doesn't need to exist.
func (APIClient) ListFile ¶
func (c APIClient) ListFile(commit *pfs.Commit, path string, cb func(fi *pfs.FileInfo) error) (retErr error)
ListFile returns info about all files in a Commit under path, calling cb with each FileInfo.
func (APIClient) ListFileAll ¶
ListFileAll returns info about all files in a Commit under path.
func (APIClient) ListJob
deprecated
func (c APIClient) ListJob(pipelineName string, inputCommit []*pfs.Commit, history int64, details bool) ([]*pps.JobInfo, error)
ListJob returns info about all jobs.
If pipelineName is non empty then only jobs that were started by the named pipeline will be returned.
If inputCommit is non-nil then only jobs which took the specific commits as inputs will be returned.
The order of the inputCommits doesn't matter.
If outputCommit is non-nil then only the job which created that commit as output will be returned.
'history' controls whether jobs from historical versions of pipelines are returned, it has the following semantics:
- 0: Return jobs from the current version of the pipeline or pipelines.
- 1: Return the above and jobs from the next most recent version
- 2: etc.
- -1: Return jobs from all historical versions.
'details' controls whether the JobInfo passed to 'f' includes details from the pipeline spec (e.g. the transform). Leaving this 'false' can improve performance.
Deprecated: use ListProjectJob instead.
func (APIClient) ListJobF
deprecated
func (APIClient) ListJobFilterF ¶
func (c APIClient) ListJobFilterF(pipelineName string, inputCommit []*pfs.Commit, history int64, details bool, jqFilter string, f func(*pps.JobInfo) error) error
ListJobFilterF returns info about all jobs, calling f with each JobInfo.
If f returns an error iteration of jobs will stop and ListJobF will return that error, unless the error is errutil.ErrBreak in which case it will return nil.
If pipelineName is non empty then only jobs that were started by the named pipeline will be returned.
If inputCommit is non-nil then only jobs which took the specific commits as inputs will be returned.
The order of the inputCommits doesn't matter.
If outputCommit is non-nil then only the job which created that commit as output will be returned.
'history' controls whether jobs from historical versions of pipelines are returned, it has the following semantics:
- 0: Return jobs from the current version of the pipeline or pipelines.
- 1: Return the above and jobs from the next most recent version
- 2: etc.
- -1: Return jobs from all historical versions.
'details' controls whether the JobInfo passed to 'f' includes details from the pipeline spec--setting this to 'false' can improve performance.
func (APIClient) ListPipeline ¶
func (c APIClient) ListPipeline(details bool) ([]*pps.PipelineInfo, error)
ListPipeline returns info about all pipelines.
func (APIClient) ListPipelineHistory
deprecated
func (c APIClient) ListPipelineHistory(pipelineName string, history int64, details bool) ([]*pps.PipelineInfo, error)
- 0: Return the current version of the pipeline or pipelines.
- 1: Return the above and the next most recent version
- 2: etc.
- -1: Return all historical versions.
Deprecated: use ListProjectPipelineHistory instead.
func (APIClient) ListProject ¶
func (c APIClient) ListProject() (_ []*pfs.ProjectInfo, retErr error)
ListProject lists projects.
func (APIClient) ListProjectBranch ¶
func (c APIClient) ListProjectBranch(projectName, repoName string) ([]*pfs.BranchInfo, error)
ListProjectBranch lists the active branches on a Repo.
func (APIClient) ListProjectDatum ¶
func (c APIClient) ListProjectDatum(projectName, pipelineName, jobID string, cb func(*pps.DatumInfo) error) (retErr error)
ListProjectDatum returns info about datums in a job.
func (APIClient) ListProjectDatumAll ¶
func (c APIClient) ListProjectDatumAll(projectName, pipelineName, jobID string) (_ []*pps.DatumInfo, retErr error)
ListProjectDatumAll returns info about datums in a job.
func (APIClient) ListProjectJob ¶
func (c APIClient) ListProjectJob(projectName, pipelineName string, inputCommit []*pfs.Commit, history int64, details bool) ([]*pps.JobInfo, error)
ListProjectJob returns info about all jobs.
If projectName & pipelineName are non empty then only jobs that were started by the named pipeline will be returned.
If inputCommit is non-nil then only jobs which took the specific commits as inputs will be returned.
The order of the inputCommits doesn't matter.
If outputCommit is non-nil then only the job which created that commit as output will be returned.
'history' controls whether jobs from historical versions of pipelines are returned, it has the following semantics:
- 0: Return jobs from the current version of the pipeline or pipelines.
- 1: Return the above and jobs from the next most recent version
- 2: etc.
- -1: Return jobs from all historical versions.
'details' controls whether the JobInfo passed to 'f' includes details from the pipeline spec (e.g. the transform). Leaving this 'false' can improve performance.
func (APIClient) ListProjectJobF ¶
func (c APIClient) ListProjectJobF(projectName, pipelineName string, inputCommit []*pfs.Commit, history int64, details bool, f func(*pps.JobInfo) error) error
ListProjectJobF is a previous version of ListJobFilterF, returning info about all jobs and calling f on each JobInfo
func (APIClient) ListProjectJobFilterF ¶
func (c APIClient) ListProjectJobFilterF(projectName, pipelineName string, inputCommit []*pfs.Commit, history int64, details bool, jqFilter string, f func(*pps.JobInfo) error) error
ListProjectJobFilterF returns info about all jobs, calling f with each JobInfo.
If f returns an error iteration of jobs will stop and ListJobF will return that error, unless the error is errutil.ErrBreak in which case it will return nil.
If projectName & pipelineName are both non-empty then only jobs that were started by the named pipeline will be returned.
If inputCommit is non-nil then only jobs which took the specific commits as inputs will be returned.
The order of the inputCommits doesn't matter.
If outputCommit is non-nil then only the job which created that commit as output will be returned.
'history' controls whether jobs from historical versions of pipelines are returned, it has the following semantics:
- 0: Return jobs from the current version of the pipeline or pipelines.
- 1: Return the above and jobs from the next most recent version
- 2: etc.
- -1: Return jobs from all historical versions.
'details' controls whether the JobInfo passed to 'f' includes details from the pipeline spec--setting this to 'false' can improve performance.
func (APIClient) ListProjectPipelineHistory ¶
func (c APIClient) ListProjectPipelineHistory(projectName, pipelineName string, history int64, details bool) ([]*pps.PipelineInfo, error)
- 0: Return the current version of the pipeline or pipelines. - 1: Return the above and the next most recent version - 2: etc. - -1: Return all historical versions.
func (APIClient) ListProjectRepo ¶
ListProjectRepo returns a list of RepoInfos given a ListRepoRequest, which can include information about which projects to filter with.
func (APIClient) ListRepoByType ¶
ListRepoByType returns info about Repos of the given type.
The if repoType is empty, all Repos will be included
func (APIClient) ListSecret ¶
func (c APIClient) ListSecret() ([]*pps.SecretInfo, error)
ListSecret returns info about all Pachyderm secrets.
func (APIClient) ListTask ¶
func (c APIClient) ListTask(service string, namespace, group string, cb func(*task.TaskInfo) error) (retErr error)
ListTask lists tasks in the given namespace and group
func (APIClient) ListTransaction ¶
func (c APIClient) ListTransaction() ([]*transaction.TransactionInfo, error)
ListTransaction is an RPC that fetches a list of all open transactions in the Pachyderm cluster.
func (APIClient) ModifyClusterRoleBinding ¶
func (APIClient) ModifyProjectRepoRoleBinding ¶
func (c APIClient) ModifyProjectRepoRoleBinding(projectName, repoName, principal string, roles []string) error
Update the roles bound to a repo within a project.
func (APIClient) ModifyProjectRoleBinding ¶
ModifyProjectRoleBinding binds a user's roles to a project.
func (APIClient) ModifyRepoRoleBinding
deprecated
func (APIClient) NewCreateFileSetClient ¶
func (c APIClient) NewCreateFileSetClient() (_ *CreateFileSetClient, retErr error)
NewCreateFileSetClient returns a CreateFileSetClient instance backed by this client
func (APIClient) NewModifyFileClient ¶
func (c APIClient) NewModifyFileClient(commit *pfs.Commit) (_ *ModifyFileClient, retErr error)
NewModifyFileClient creates a new ModifyFileClient.
func (APIClient) Profile ¶
func (c APIClient) Profile(profile *debug.Profile, filter *debug.Filter, w io.Writer) (retErr error)
Profile collects a set of pprof profiles.
func (APIClient) PutFile ¶
func (c APIClient) PutFile(commit *pfs.Commit, path string, r io.Reader, opts ...PutFileOption) error
PutFile puts a file into PFS from a reader.
func (APIClient) PutFileTAR ¶
PutFileTAR puts a set of files into PFS from a tar stream.
func (APIClient) PutFileURL ¶
func (c APIClient) PutFileURL(commit *pfs.Commit, path, url string, recursive bool, opts ...PutFileOption) error
PutFileURL puts a file into PFS using the content found at a URL. The URL is sent to the server which performs the request. recursive allow for recursive scraping of some types of URLs for example on s3:// urls.
func (APIClient) RenewFileSet ¶
RenewFileSet renews a fileset.
func (APIClient) RestartDatum
deprecated
RestartDatum restarts a datum that's being processed as part of a job.
datumFilter is a slice of strings which are matched against either the Path or Hash of the datum, the order of the strings in datumFilter is irrelevant.
Deprecated: use RestartProjectDatum instead.
func (APIClient) RestartProjectDatum ¶
func (c APIClient) RestartProjectDatum(projectName, pipelineName, jobID string, datumFilter []string) error
RestartProjectDatum restarts a datum that's being processed as part of a job.
datumFilter is a slice of strings which are matched against either the Path or Hash of the datum, the order of the strings in datumFilter is irrelevant.
func (APIClient) RunBatchInTransaction ¶
func (c APIClient) RunBatchInTransaction(cb func(builder *TransactionBuilder) error) (*transaction.TransactionInfo, error)
RunBatchInTransaction will execute a batch of API calls in a single round-trip transactionally. The callback is used to build the request, which is executed when the callback returns.
func (APIClient) RunCron
deprecated
func (APIClient) RunPipeline
deprecated
RunPipeline runs a pipeline. It can be passed a list of commit provenance. This will trigger a new job provenant on those commits, effectively running the pipeline on the data in those commits.
Deprecated: use RunProjectPipeline instead.
func (APIClient) RunProjectCron ¶
RunProjectCron runs a pipeline. It can be passed a list of commit provenance. This will trigger a new job provenant on those commits, effectively running the pipeline on the data in those commits.
func (APIClient) RunProjectPipeline ¶
func (c APIClient) RunProjectPipeline(projectName, pipelineName string, provenance []*pfs.Commit, jobID string) error
RunProjectPipeline runs a pipeline. It can be passed a list of commit provenance. This will trigger a new job provenant on those commits, effectively running the pipeline on the data in those commits.
func (*APIClient) SetAuthToken ¶
SetAuthToken sets the authentication token that will be used for all API calls for this client.
func (APIClient) ShardFileSet ¶
func (APIClient) SquashCommitSet ¶
SquashCommitSet squashes the commits of a CommitSet into their children.
func (APIClient) StartCommit
deprecated
StartCommit begins the process of committing data to a Repo. Once started you can write to the Commit with PutFile and when all the data has been written you must finish the Commit with FinishCommit. NOTE, data is not persisted until FinishCommit is called.
branch is a more convenient way to build linear chains of commits. When a commit is started with a non empty branch the value of branch becomes an alias for the created Commit. This enables a more intuitive access pattern. When the commit is started on a branch the previous head of the branch is used as the parent of the commit.
Deprecated: use StartProjectCommit instead.
func (APIClient) StartCommitParent
deprecated
func (c APIClient) StartCommitParent(repoName, branchName, parentBranch, parentCommit string) (*pfs.Commit, error)
StartCommitParent begins the process of committing data to a Repo. Once started you can write to the Commit with PutFile and when all the data has been written you must finish the Commit with FinishCommit. NOTE, data is not persisted until FinishCommit is called. branch is a more convenient way to build linear chains of commits. When a commit is started with a non empty branch the value of branch becomes an alias for the created Commit. This enables a more intuitive access pattern. When the commit is started on a branch the previous head of the branch is used as the parent of the commit. parentCommit specifies the parent Commit, upon creation the new Commit will appear identical to the parent Commit, data can safely be added to the new commit without affecting the contents of the parent Commit. You may pass "" as parentCommit in which case the new Commit will have no parent and will initially appear empty.
Deprecated: use StartProjectCommitParent instead.
func (APIClient) StartPipeline
deprecated
func (APIClient) StartProjectCommit ¶
func (c APIClient) StartProjectCommit(projectName, repoName string, branchName string) (_ *pfs.Commit, retErr error)
StartProjectCommit begins the process of committing data to a Repo. Once started you can write to the Commit with PutFile and when all the data has been written you must finish the Commit with FinishCommit. NOTE, data is not persisted until FinishCommit is called.
branch is a more convenient way to build linear chains of commits. When a commit is started with a non empty branch the value of branch becomes an alias for the created Commit. This enables a more intuitive access pattern. When the commit is started on a branch the previous head of the branch is used as the parent of the commit.
func (APIClient) StartProjectCommitParent ¶
func (c APIClient) StartProjectCommitParent(projectName, repoName, branchName, parentBranch, parentCommit string) (*pfs.Commit, error)
StartProjectCommitParent begins the process of committing data to a Repo. Once started you can write to the Commit with PutFile and when all the data has been written you must finish the Commit with FinishCommit. NOTE, data is not persisted until FinishCommit is called.
branch is a more convenient way to build linear chains of commits. When a commit is started with a non empty branch the value of branch becomes an alias for the created Commit. This enables a more intuitive access pattern. When the commit is started on a branch the previous head of the branch is used as the parent of the commit.
parentCommit specifies the parent Commit, upon creation the new Commit will appear identical to the parent Commit, data can safely be added to the new commit without affecting the contents of the parent Commit. You may pass "" as parentCommit in which case the new Commit will have no parent and will initially appear empty.
func (APIClient) StartProjectPipeline ¶
StartProjectPipeline restarts a stopped pipeline.
func (APIClient) StartTransaction ¶
func (c APIClient) StartTransaction() (*transaction.Transaction, error)
StartTransaction is an RPC that registers a new transaction with the Pachyderm cluster and returns the identifier of the new transaction.
func (APIClient) StopPipeline
deprecated
func (APIClient) StopProjectJob ¶
StopProjectJob stops a job.
func (APIClient) StopProjectPipeline ¶
StopProjectPipeline prevents a pipeline from processing things; it can be restarted with StartProjectPipeline.
func (APIClient) SubscribeCommit ¶
func (c APIClient) SubscribeCommit(repo *pfs.Repo, branchName string, from string, state pfs.CommitState, cb func(*pfs.CommitInfo) error) (retErr error)
SubscribeCommit is like ListCommit but it keeps listening for commits as they come in.
func (APIClient) SubscribeProjectJob ¶
func (c APIClient) SubscribeProjectJob(projectName, pipelineName string, details bool, cb func(*pps.JobInfo) error) error
SubscribeProjectJob calls the given callback with each open job in the given pipeline until cancelled.
func (APIClient) UpdateProject ¶
UpdateProject upserts a project with the given name.
func (APIClient) UpdateProjectRepo ¶
UpdateProjectRepo upserts a repo with the given name.
func (APIClient) UpdateRepo
deprecated
func (APIClient) WaitCommit
deprecated
func (c APIClient) WaitCommit(repoName, branchName, commitID string) (_ *pfs.CommitInfo, retErr error)
WaitCommit returns info about a specific Commit, but blocks until that commit has been finished.
Deprecated: use WaitProjectCommit instead.
func (APIClient) WaitCommitSet ¶
WaitCommitSet blocks until each of a CommitSet's commits are finished, passing them to the given callback as they finish. To wait for an individual commit, use WaitCommit instead.
func (APIClient) WaitCommitSetAll ¶
func (c APIClient) WaitCommitSetAll(id string) (_ []*pfs.CommitInfo, retErr error)
WaitCommitSetAll blocks until all of a CommitSet's commits are finished. To wait for an individual commit, use WaitCommit instead.
func (APIClient) WaitJob ¶
func (c APIClient) WaitJob(pipelineName string, jobID string, details bool) (_ *pps.JobInfo, retErr error)
WaitJob is a blocking version of InspectJob that will wait until the job has reached a terminal state.
Deprecate: use WaitProjectJob instead.
func (APIClient) WaitJobSet ¶
func (APIClient) WaitJobSetAll ¶
func (APIClient) WaitProjectCommit ¶
func (c APIClient) WaitProjectCommit(projectName, repoName, branchName, commitID string) (_ *pfs.CommitInfo, retErr error)
WaitProjectCommit returns info about a specific Commit, but blocks until that commit has been finished.
func (APIClient) WaitProjectJob ¶
func (c APIClient) WaitProjectJob(projectName, pipelineName, jobID string, details bool) (_ *pps.JobInfo, retErr error)
WaitProjectJob is a blocking version of InspectJob that will wait until the job has reached a terminal state.
func (APIClient) WalkFile ¶
func (c APIClient) WalkFile(commit *pfs.Commit, path string, cb func(*pfs.FileInfo) error) (retErr error)
WalkFile walks the files under path.
func (APIClient) WithCreateFileSetClient ¶
func (c APIClient) WithCreateFileSetClient(cb func(ModifyFile) error) (resp *pfs.CreateFileSetResponse, retErr error)
WithCreateFileSetClient provides a scoped fileset client.
func (*APIClient) WithCtx ¶
WithCtx returns a new APIClient that uses ctx for requests it sends. Note that the new APIClient will still use the authentication token and metrics metadata of this client, so this is only useful for propagating other context-associated metadata.
func (APIClient) WithDefaultTransformImage ¶
WithDefaultTransformImage sets the image used when the empty string "" is passed as the image in calls to CreatePipeline*
func (APIClient) WithDefaultTransformUser ¶
WithDefaultTransformUser sets the user to run the transform container as. This overrides the user set by the image.
func (APIClient) WithModifyFileClient ¶
func (c APIClient) WithModifyFileClient(commit *pfs.Commit, cb func(ModifyFile) error) (retErr error)
WithModifyFileClient creates a new ModifyFileClient that is scoped to the passed in callback. TODO: Context should be a parameter, not stored in the pach client.
func (APIClient) WithRenewer ¶
WithRenewer provides a scoped fileset renewer.
func (APIClient) WithTransaction ¶
func (c APIClient) WithTransaction(txn *transaction.Transaction) *APIClient
WithTransaction (client-side) returns a new APIClient that will run supported write operations within the specified transaction.
func (APIClient) WithoutTransaction ¶
WithoutTransaction returns a new APIClient which will run all future operations outside of any active transaction Removing from both incoming and outgoing metadata is necessary because Ctx() merges them
type AdminAPIClient ¶
AdminAPIClient is an alias of admin.APIClient
type CopyFileOption ¶
CopyFileOption configures a CopyFile call.
func WithAppendCopyFile ¶
func WithAppendCopyFile() CopyFileOption
WithAppendCopyFile configures the CopyFile call to append to existing files.
func WithDatumCopyFile ¶
func WithDatumCopyFile(datum string) CopyFileOption
WithDatumCopyFile configures the CopyFile call to apply to a particular datum.
type CreateFileSetClient ¶
type CreateFileSetClient struct {
// contains filtered or unexported fields
}
CreateFileSetClient is used to create a temporary fileset.
func (*CreateFileSetClient) Close ¶
func (ctfsc *CreateFileSetClient) Close() (*pfs.CreateFileSetResponse, error)
Close closes the CreateFileSetClient.
func (*CreateFileSetClient) CopyFile ¶
func (mfc *CreateFileSetClient) CopyFile(dst string, src *pfs.File, opts ...CopyFileOption) error
func (*CreateFileSetClient) DeleteFile ¶
func (mfc *CreateFileSetClient) DeleteFile(path string, opts ...DeleteFileOption) error
func (*CreateFileSetClient) PutFile ¶
func (mfc *CreateFileSetClient) PutFile(path string, r io.Reader, opts ...PutFileOption) error
func (*CreateFileSetClient) PutFileTAR ¶
func (mfc *CreateFileSetClient) PutFileTAR(r io.Reader, opts ...PutFileOption) error
func (*CreateFileSetClient) PutFileURL ¶
func (mfc *CreateFileSetClient) PutFileURL(path, url string, recursive bool, opts ...PutFileOption) error
type DeleteFileOption ¶
type DeleteFileOption func(*deleteFileConfig)
DeleteFileOption configures a DeleteFile call.
func WithDatumDeleteFile ¶
func WithDatumDeleteFile(datum string) DeleteFileOption
WithDatumDeleteFile configures the DeleteFile call to apply to a particular datum.
func WithRecursiveDeleteFile ¶
func WithRecursiveDeleteFile() DeleteFileOption
WithRecursiveDeleteFile configures the DeleteFile call to recursively delete the files in a directory.
type FindCommitsResponse ¶
type FindCommitsResponse struct { FoundCommits []*pfs.Commit LastSearchedCommit *pfs.Commit CommitsSearched uint32 }
FindCommitsResponse is a merged response of *pfs.FindCommitsResponse items that is presented to users.
type FsckOption ¶
type FsckOption func(*pfs.FsckRequest)
func WithZombieCheckAll ¶
func WithZombieCheckAll() FsckOption
func WithZombieCheckTarget ¶
func WithZombieCheckTarget(c *pfs.Commit) FsckOption
type GetFileOption ¶
type GetFileOption func(*pfs.GetFileRequest)
GetFileOption configures a GetFile call
func WithDatumGetFile ¶
func WithDatumGetFile(datum string) GetFileOption
WithDatumGetFile sets the datum for the get file request
func WithOffset ¶
func WithOffset(offset int64) GetFileOption
type IdentityAPIClient ¶
IdentityAPIClient is an alias of identity.APIClient
type LogsIter ¶
type LogsIter struct {
// contains filtered or unexported fields
}
LogsIter iterates through log messages returned from pps.GetLogs. Logs can be fetched with 'Next()'. The log message received can be examined with 'Message()', and any errors can be examined with 'Err()'.
func (*LogsIter) Message ¶
func (l *LogsIter) Message() *pps.LogMessage
Message returns the most recently retrieve log message (as an annotated log line, in the form of a pps.LogMessage)
type ModifyFile ¶
type ModifyFile interface { // PutFile puts a file into PFS from a reader. PutFile(path string, r io.Reader, opts ...PutFileOption) error // PutFileTAR puts a set of files into PFS from a tar stream. PutFileTAR(r io.Reader, opts ...PutFileOption) error // PutFileURL puts a file into PFS using the content found at a URL. // recursive allows for recursive scraping of some types of URLs. PutFileURL(path, url string, recursive bool, opts ...PutFileOption) error // DeleteFile deletes a file from PFS. DeleteFile(path string, opts ...DeleteFileOption) error // CopyFile copies a file from src to dst. CopyFile(dst string, src *pfs.File, opts ...CopyFileOption) error }
ModifyFile is used for performing a stream of file modifications. The modifications are not persisted until the ModifyFileClient is closed. ModifyFileClient is not thread safe. Multiple ModifyFileClients should be used for concurrent modifications.
type ModifyFileClient ¶
type ModifyFileClient struct {
// contains filtered or unexported fields
}
func NewNoOpModifyFileClient ¶
func NewNoOpModifyFileClient() *ModifyFileClient
NewNoOpModifyFileClient returns a ModifyFileClient that does nothing; it accepts any operation and does not error.
func (*ModifyFileClient) Close ¶
func (mfc *ModifyFileClient) Close() error
Close closes the ModifyFileClient.
func (*ModifyFileClient) CopyFile ¶
func (mfc *ModifyFileClient) CopyFile(dst string, src *pfs.File, opts ...CopyFileOption) error
func (*ModifyFileClient) DeleteFile ¶
func (mfc *ModifyFileClient) DeleteFile(path string, opts ...DeleteFileOption) error
func (*ModifyFileClient) PutFile ¶
func (mfc *ModifyFileClient) PutFile(path string, r io.Reader, opts ...PutFileOption) error
func (*ModifyFileClient) PutFileTAR ¶
func (mfc *ModifyFileClient) PutFileTAR(r io.Reader, opts ...PutFileOption) error
func (*ModifyFileClient) PutFileURL ¶
func (mfc *ModifyFileClient) PutFileURL(path, url string, recursive bool, opts ...PutFileOption) error
type Option ¶
type Option func(*clientSettings) error
Option is a client creation option that may be passed to NewOnUserMachine(), or NewInCluster()
func WithAdditionalPachdCert ¶
func WithAdditionalPachdCert() Option
WithAdditionalPachdCert instructs the New* functions to additionally trust the signed cert mounted in Pachd's cert volume. This is used by Pachd when connecting to itself (if no cert is present, the clients cert pool will not be modified, so that if no other options have been passed, pachd will connect to itself over an insecure connection)
func WithAdditionalRootCAs ¶
WithAdditionalRootCAs instructs the New* functions to additionally trust the given base64-encoded, signed x509 certificates as root certificates. Introduced to pass certs in the Pachyderm config
func WithAdditionalStreamClientInterceptors ¶
func WithAdditionalStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) Option
WithAdditionalStreamClientInterceptors instructs the New* functions to add the provided StreamClientInterceptors to the gRPC dial options when opening a client connection. Internally, all of the provided options are coalesced into one chain, so it is safe to provide this option more than once.
This client creates both Unary and Stream client connections, so you will probably want to supply a corresponding WithAdditionalUnaryClientInterceptors option.
func WithAdditionalUnaryClientInterceptors ¶
func WithAdditionalUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) Option
WithAdditionalUnaryClientInterceptors instructs the New* functions to add the provided UnaryClientInterceptors to the gRPC dial options when opening a client connection. Internally, all of the provided options are coalesced into one chain, so it is safe to provide this option more than once.
This client creates both Unary and Stream client connections, so you will probably want to supply a corresponding WithAdditionalStreamClientInterceptors call.
func WithCertPool ¶
WithCertPool instructs the New* functions to create a client that uses the provided cert pool to validate the server's identity when connecting with TLS.
func WithDialTimeout ¶
WithDialTimeout instructs the New* functions to use 't' as the deadline to connect to pachd
func WithGZIPCompression ¶
func WithGZIPCompression() Option
WithGZIPCompression enabled GZIP compression for data on the wire
func WithMaxConcurrentStreams ¶
WithMaxConcurrentStreams instructs the New* functions to create client that can have at most 'streams' concurrent streams open with pachd at a time
func WithRootCAs ¶
WithRootCAs instructs the New* functions to create client that uses the given signed x509 certificates as the trusted root certificates (instead of the system certs). Introduced to pass certs provided via command-line flags
type PortForwarder ¶
type PortForwarder struct {
// contains filtered or unexported fields
}
PortForwarder handles proxying local traffic to a kubernetes pod
func NewPortForwarder ¶
func NewPortForwarder(context *config.Context, namespace string) (*PortForwarder, error)
NewPortForwarder creates a new port forwarder
func (*PortForwarder) Run ¶
func (f *PortForwarder) Run(appName string, localPort, remotePort uint16, selectors ...string) (uint16, error)
Run starts the port forwarder. Returns after initialization is begun with the locally bound port and any initialization errors.
func (*PortForwarder) RunForConsole ¶
func (f *PortForwarder) RunForConsole(localPort, remotePort uint16) (uint16, error)
RunForConsole creates a port forwarder for console
func (*PortForwarder) RunForEnterpriseServer ¶
func (f *PortForwarder) RunForEnterpriseServer(localPort, remotePort uint16) (uint16, error)
RunForEnterpriseServer creates a port forwarder for the enterprise server
func (*PortForwarder) RunForPachd ¶
func (f *PortForwarder) RunForPachd(localPort, remotePort uint16) (uint16, error)
RunForDaemon creates a port forwarder for the pachd daemon.
type PutFileOption ¶
type PutFileOption func(*putFileConfig)
PutFileOption configures a PutFile call.
func WithAppendPutFile ¶
func WithAppendPutFile() PutFileOption
WithAppendPutFile configures the PutFile call to append to existing files.
func WithDatumPutFile ¶
func WithDatumPutFile(datum string) PutFileOption
WithDatumPutFile configures the PutFile call to apply to a particular datum.
func WithImportConcurrency ¶
func WithImportConcurrency(importConcurrency uint32) PutFileOption
WithImportConcurrency configures the maximum number of tasks in flight created by PutFileURL.
type TransactionAPIClient ¶
type TransactionAPIClient transaction.APIClient
TransactionAPIClient is an alias of transaction.APIClient
type TransactionBuilder ¶
type TransactionBuilder struct { APIClient // contains filtered or unexported fields }
TransactionBuilder presents the same interface as a pachyderm APIClient, but captures requests rather than sending to the server. If a request is not supported by the transaction system, it immediately errors.
func (*TransactionBuilder) Close ¶
func (tb *TransactionBuilder) Close() error
Close does not exist on a TransactionBuilder because it doesn't represent ownership of a connection to the API server. We need this to shadow the inherited Close, though.
func (*TransactionBuilder) GetAddress ¶
func (tb *TransactionBuilder) GetAddress() *grpcutil.PachdAddress
GetAddress should not exist on a TransactionBuilder because it doesn't represent ownership of a connection to the API server, but it also doesn't return an error, so we just passthrough to the parent client's implementation.
type VersionAPIClient ¶
VersionAPIClient is an alias of versionpb.APIClient