forked from pachyderm/pachyderm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.go
43 lines (40 loc) · 914 Bytes
/
example.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package example
import (
"github.com/pachyderm/pachyderm/src/client/pfs"
ppsclient "github.com/pachyderm/pachyderm/src/client/pps"
)
func CreateJobRequest() *ppsclient.CreateJobRequest {
return &ppsclient.CreateJobRequest{
Transform: &ppsclient.Transform{
Cmd: []string{"cmd", "args..."},
},
Shards: 1,
Inputs: []*ppsclient.JobInput{
{
Commit: &pfs.Commit{
Repo: &pfs.Repo{Name: "in_repo"},
ID: "10cf676b626044f9a405235bf7660959",
},
},
},
ParentJob: &ppsclient.Job{
ID: "a951ca06cfda4377b8ffaa050d1074df",
},
}
}
func CreatePipelineRequest() *ppsclient.CreatePipelineRequest {
return &ppsclient.CreatePipelineRequest{
Pipeline: &ppsclient.Pipeline{
Name: "name",
},
Transform: &ppsclient.Transform{
Cmd: []string{"cmd", "args..."},
},
Shards: 1,
Inputs: []*ppsclient.PipelineInput{
{
Repo: &pfs.Repo{Name: "in_repo"},
},
},
}
}