Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Unified Diff: scheduler/api/scheduler/v1/scheduler.pb.go

Issue 2948163002: scheduler: add GetJobInvocations api. (Closed)
Patch Set: grpc.error Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scheduler/api/scheduler/v1/scheduler.proto ('k') | scheduler/appengine/apiservers/scheduler.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/api/scheduler/v1/scheduler.pb.go
diff --git a/scheduler/api/scheduler/v1/scheduler.pb.go b/scheduler/api/scheduler/v1/scheduler.pb.go
index e40ec9945d61e87b041bc3e19edf16b3f76906de..59abfbcd003dfd9c3ab0e0d70fbc7dc033744773 100644
--- a/scheduler/api/scheduler/v1/scheduler.pb.go
+++ b/scheduler/api/scheduler/v1/scheduler.pb.go
@@ -12,6 +12,9 @@ It has these top-level messages:
JobsReply
Job
JobState
+ InvocationsRequest
+ InvocationsReply
+ Invocation
*/
package scheduler
@@ -126,11 +129,176 @@ func (m *JobState) GetUiStatus() string {
return ""
}
+type InvocationsRequest struct {
+ Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
+ Job string `protobuf:"bytes,2,opt,name=job" json:"job,omitempty"`
+ Cursor string `protobuf:"bytes,3,opt,name=cursor" json:"cursor,omitempty"`
+ // page_size defaults to 50 which is maximum.
+ PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
+}
+
+func (m *InvocationsRequest) Reset() { *m = InvocationsRequest{} }
+func (m *InvocationsRequest) String() string { return proto.CompactTextString(m) }
+func (*InvocationsRequest) ProtoMessage() {}
+func (*InvocationsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
+
+func (m *InvocationsRequest) GetProject() string {
+ if m != nil {
+ return m.Project
+ }
+ return ""
+}
+
+func (m *InvocationsRequest) GetJob() string {
+ if m != nil {
+ return m.Job
+ }
+ return ""
+}
+
+func (m *InvocationsRequest) GetCursor() string {
+ if m != nil {
+ return m.Cursor
+ }
+ return ""
+}
+
+func (m *InvocationsRequest) GetPageSize() int32 {
+ if m != nil {
+ return m.PageSize
+ }
+ return 0
+}
+
+type InvocationsReply struct {
+ Invocations []*Invocation `protobuf:"bytes,1,rep,name=invocations" json:"invocations,omitempty"`
+ NextCursor string `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor" json:"next_cursor,omitempty"`
+}
+
+func (m *InvocationsReply) Reset() { *m = InvocationsReply{} }
+func (m *InvocationsReply) String() string { return proto.CompactTextString(m) }
+func (*InvocationsReply) ProtoMessage() {}
+func (*InvocationsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
+
+func (m *InvocationsReply) GetInvocations() []*Invocation {
+ if m != nil {
+ return m.Invocations
+ }
+ return nil
+}
+
+func (m *InvocationsReply) GetNextCursor() string {
+ if m != nil {
+ return m.NextCursor
+ }
+ return ""
+}
+
+type Invocation struct {
+ Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
+ Job string `protobuf:"bytes,2,opt,name=job" json:"job,omitempty"`
+ Project string `protobuf:"bytes,3,opt,name=project" json:"project,omitempty"`
+ // start_ts is unix timestamp in microseconds.
+ StartedTs int64 `protobuf:"varint,4,opt,name=started_ts,json=startedTs" json:"started_ts,omitempty"`
+ // finished_ts is unix timestamp in microseconds. Set only if final is true.
+ FinishedTs int64 `protobuf:"varint,5,opt,name=finished_ts,json=finishedTs" json:"finished_ts,omitempty"`
+ // triggered_by is an identity ("kind:value") which is specified only if
+ // invocation was triggered by not the scheduler service itself.
+ TriggeredBy string `protobuf:"bytes,6,opt,name=triggered_by,json=triggeredBy" json:"triggered_by,omitempty"`
+ // Latest status of a job.
+ Status string `protobuf:"bytes,7,opt,name=status" json:"status,omitempty"`
+ // If true, the status of the job is final and won't change.
+ Final bool `protobuf:"varint,8,opt,name=final" json:"final,omitempty"`
+ // config_revision pins project/job config version according to which this
+ // invocation was created.
+ ConfigRevision string `protobuf:"bytes,9,opt,name=config_revision,json=configRevision" json:"config_revision,omitempty"`
+ // view_url points to human readable page for a given invocation if available.
+ ViewUrl string `protobuf:"bytes,10,opt,name=view_url,json=viewUrl" json:"view_url,omitempty"`
+}
+
+func (m *Invocation) Reset() { *m = Invocation{} }
+func (m *Invocation) String() string { return proto.CompactTextString(m) }
+func (*Invocation) ProtoMessage() {}
+func (*Invocation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
+
+func (m *Invocation) GetId() int64 {
+ if m != nil {
+ return m.Id
+ }
+ return 0
+}
+
+func (m *Invocation) GetJob() string {
+ if m != nil {
+ return m.Job
+ }
+ return ""
+}
+
+func (m *Invocation) GetProject() string {
+ if m != nil {
+ return m.Project
+ }
+ return ""
+}
+
+func (m *Invocation) GetStartedTs() int64 {
+ if m != nil {
+ return m.StartedTs
+ }
+ return 0
+}
+
+func (m *Invocation) GetFinishedTs() int64 {
+ if m != nil {
+ return m.FinishedTs
+ }
+ return 0
+}
+
+func (m *Invocation) GetTriggeredBy() string {
+ if m != nil {
+ return m.TriggeredBy
+ }
+ return ""
+}
+
+func (m *Invocation) GetStatus() string {
+ if m != nil {
+ return m.Status
+ }
+ return ""
+}
+
+func (m *Invocation) GetFinal() bool {
+ if m != nil {
+ return m.Final
+ }
+ return false
+}
+
+func (m *Invocation) GetConfigRevision() string {
+ if m != nil {
+ return m.ConfigRevision
+ }
+ return ""
+}
+
+func (m *Invocation) GetViewUrl() string {
+ if m != nil {
+ return m.ViewUrl
+ }
+ return ""
+}
+
func init() {
proto.RegisterType((*JobsRequest)(nil), "scheduler.JobsRequest")
proto.RegisterType((*JobsReply)(nil), "scheduler.JobsReply")
proto.RegisterType((*Job)(nil), "scheduler.Job")
proto.RegisterType((*JobState)(nil), "scheduler.JobState")
+ proto.RegisterType((*InvocationsRequest)(nil), "scheduler.InvocationsRequest")
+ proto.RegisterType((*InvocationsReply)(nil), "scheduler.InvocationsReply")
+ proto.RegisterType((*Invocation)(nil), "scheduler.Invocation")
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -145,7 +313,11 @@ const _ = grpc.SupportPackageIsVersion4
type SchedulerClient interface {
// GetJobs fetches all jobs satisfying JobsRequest and visibility ACLs.
+ // If JobsRequest.project is specified but the project doesn't exist, empty
+ // list of Jobs is returned.
GetJobs(ctx context.Context, in *JobsRequest, opts ...grpc.CallOption) (*JobsReply, error)
+ // GetInvocations fetches invocations of a given job, most recent first.
+ GetInvocations(ctx context.Context, in *InvocationsRequest, opts ...grpc.CallOption) (*InvocationsReply, error)
}
type schedulerPRPCClient struct {
client *prpc.Client
@@ -164,6 +336,15 @@ func (c *schedulerPRPCClient) GetJobs(ctx context.Context, in *JobsRequest, opts
return out, nil
}
+func (c *schedulerPRPCClient) GetInvocations(ctx context.Context, in *InvocationsRequest, opts ...grpc.CallOption) (*InvocationsReply, error) {
+ out := new(InvocationsReply)
+ err := c.client.Call(ctx, "scheduler.Scheduler", "GetInvocations", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
type schedulerClient struct {
cc *grpc.ClientConn
}
@@ -181,11 +362,24 @@ func (c *schedulerClient) GetJobs(ctx context.Context, in *JobsRequest, opts ...
return out, nil
}
+func (c *schedulerClient) GetInvocations(ctx context.Context, in *InvocationsRequest, opts ...grpc.CallOption) (*InvocationsReply, error) {
+ out := new(InvocationsReply)
+ err := grpc.Invoke(ctx, "/scheduler.Scheduler/GetInvocations", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// Server API for Scheduler service
type SchedulerServer interface {
// GetJobs fetches all jobs satisfying JobsRequest and visibility ACLs.
+ // If JobsRequest.project is specified but the project doesn't exist, empty
+ // list of Jobs is returned.
GetJobs(context.Context, *JobsRequest) (*JobsReply, error)
+ // GetInvocations fetches invocations of a given job, most recent first.
+ GetInvocations(context.Context, *InvocationsRequest) (*InvocationsReply, error)
}
func RegisterSchedulerServer(s prpc.Registrar, srv SchedulerServer) {
@@ -210,6 +404,24 @@ func _Scheduler_GetJobs_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
+func _Scheduler_GetInvocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(InvocationsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchedulerServer).GetInvocations(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/scheduler.Scheduler/GetInvocations",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchedulerServer).GetInvocations(ctx, req.(*InvocationsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Scheduler_serviceDesc = grpc.ServiceDesc{
ServiceName: "scheduler.Scheduler",
HandlerType: (*SchedulerServer)(nil),
@@ -218,6 +430,10 @@ var _Scheduler_serviceDesc = grpc.ServiceDesc{
MethodName: "GetJobs",
Handler: _Scheduler_GetJobs_Handler,
},
+ {
+ MethodName: "GetInvocations",
+ Handler: _Scheduler_GetInvocations_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/luci/luci-go/scheduler/api/scheduler/v1/scheduler.proto",
@@ -228,22 +444,37 @@ func init() {
}
var fileDescriptor0 = []byte{
- // 258 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xc1, 0x4b, 0xc3, 0x30,
- 0x14, 0xc6, 0xa9, 0xab, 0xae, 0x7d, 0x05, 0x0f, 0x4f, 0x91, 0x30, 0x2f, 0x25, 0x97, 0xd5, 0x83,
- 0x2d, 0xd6, 0x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 0x99, 0xef, 0x93, 0xbe, 0xfe, 0x55, 0x3f, 0xfd,
+ 0x09, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xfa, 0x4f, 0xce, 0xf0, 0x03, 0x00, 0x00,
}
« no previous file with comments | « scheduler/api/scheduler/v1/scheduler.proto ('k') | scheduler/appengine/apiservers/scheduler.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698