| 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 35d512a14ce074463cf59e058d3772c13bd0a34e..dac26570fa7100daad969e832974f99bf5f49c0e 100644
|
| --- a/scheduler/api/scheduler/v1/scheduler.pb.go
|
| +++ b/scheduler/api/scheduler/v1/scheduler.pb.go
|
| @@ -8,6 +8,10 @@ It is generated from these files:
|
| github.com/luci/luci-go/scheduler/api/scheduler/v1/scheduler.proto
|
|
|
| It has these top-level messages:
|
| + JobsRequest
|
| + JobsReply
|
| + JobWithState
|
| + JobState
|
| */
|
| package scheduler
|
|
|
| @@ -33,6 +37,102 @@ var _ = math.Inf
|
| // proto package needs to be updated.
|
| const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
| +type JobsRequest struct {
|
| + // If not specified or "", all projects' jobs are returned.
|
| + Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
|
| +}
|
| +
|
| +func (m *JobsRequest) Reset() { *m = JobsRequest{} }
|
| +func (m *JobsRequest) String() string { return proto.CompactTextString(m) }
|
| +func (*JobsRequest) ProtoMessage() {}
|
| +func (*JobsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
| +
|
| +func (m *JobsRequest) GetProject() string {
|
| + if m != nil {
|
| + return m.Project
|
| + }
|
| + return ""
|
| +}
|
| +
|
| +type JobsReply struct {
|
| + Jobs []*JobWithState `protobuf:"bytes,1,rep,name=jobs" json:"jobs,omitempty"`
|
| +}
|
| +
|
| +func (m *JobsReply) Reset() { *m = JobsReply{} }
|
| +func (m *JobsReply) String() string { return proto.CompactTextString(m) }
|
| +func (*JobsReply) ProtoMessage() {}
|
| +func (*JobsReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
| +
|
| +func (m *JobsReply) GetJobs() []*JobWithState {
|
| + if m != nil {
|
| + return m.Jobs
|
| + }
|
| + return nil
|
| +}
|
| +
|
| +type JobWithState struct {
|
| + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
| + Project string `protobuf:"bytes,2,opt,name=project" json:"project,omitempty"`
|
| + Schedule string `protobuf:"bytes,3,opt,name=schedule" json:"schedule,omitempty"`
|
| + State *JobState `protobuf:"bytes,4,opt,name=state" json:"state,omitempty"`
|
| +}
|
| +
|
| +func (m *JobWithState) Reset() { *m = JobWithState{} }
|
| +func (m *JobWithState) String() string { return proto.CompactTextString(m) }
|
| +func (*JobWithState) ProtoMessage() {}
|
| +func (*JobWithState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
| +
|
| +func (m *JobWithState) GetId() string {
|
| + if m != nil {
|
| + return m.Id
|
| + }
|
| + return ""
|
| +}
|
| +
|
| +func (m *JobWithState) GetProject() string {
|
| + if m != nil {
|
| + return m.Project
|
| + }
|
| + return ""
|
| +}
|
| +
|
| +func (m *JobWithState) GetSchedule() string {
|
| + if m != nil {
|
| + return m.Schedule
|
| + }
|
| + return ""
|
| +}
|
| +
|
| +func (m *JobWithState) GetState() *JobState {
|
| + if m != nil {
|
| + return m.State
|
| + }
|
| + return nil
|
| +}
|
| +
|
| +type JobState struct {
|
| + Kind string `protobuf:"bytes,1,opt,name=kind" json:"kind,omitempty"`
|
| +}
|
| +
|
| +func (m *JobState) Reset() { *m = JobState{} }
|
| +func (m *JobState) String() string { return proto.CompactTextString(m) }
|
| +func (*JobState) ProtoMessage() {}
|
| +func (*JobState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
| +
|
| +func (m *JobState) GetKind() string {
|
| + if m != nil {
|
| + return m.Kind
|
| + }
|
| + return ""
|
| +}
|
| +
|
| +func init() {
|
| + proto.RegisterType((*JobsRequest)(nil), "scheduler.JobsRequest")
|
| + proto.RegisterType((*JobsReply)(nil), "scheduler.JobsReply")
|
| + proto.RegisterType((*JobWithState)(nil), "scheduler.JobWithState")
|
| + proto.RegisterType((*JobState)(nil), "scheduler.JobState")
|
| +}
|
| +
|
| // Reference imports to suppress errors if they are not otherwise used.
|
| var _ context.Context
|
| var _ grpc.ClientConn
|
| @@ -44,6 +144,8 @@ const _ = grpc.SupportPackageIsVersion4
|
| // Client API for Scheduler service
|
|
|
| type SchedulerClient interface {
|
| + // GetJobs fetches all jobs satisfying JobsRequest and visibility ACLs.
|
| + GetJobs(ctx context.Context, in *JobsRequest, opts ...grpc.CallOption) (*JobsReply, error)
|
| }
|
| type schedulerPRPCClient struct {
|
| client *prpc.Client
|
| @@ -53,6 +155,15 @@ func NewSchedulerPRPCClient(client *prpc.Client) SchedulerClient {
|
| return &schedulerPRPCClient{client}
|
| }
|
|
|
| +func (c *schedulerPRPCClient) GetJobs(ctx context.Context, in *JobsRequest, opts ...grpc.CallOption) (*JobsReply, error) {
|
| + out := new(JobsReply)
|
| + err := c.client.Call(ctx, "scheduler.Scheduler", "GetJobs", in, out, opts...)
|
| + if err != nil {
|
| + return nil, err
|
| + }
|
| + return out, nil
|
| +}
|
| +
|
| type schedulerClient struct {
|
| cc *grpc.ClientConn
|
| }
|
| @@ -61,21 +172,55 @@ func NewSchedulerClient(cc *grpc.ClientConn) SchedulerClient {
|
| return &schedulerClient{cc}
|
| }
|
|
|
| +func (c *schedulerClient) GetJobs(ctx context.Context, in *JobsRequest, opts ...grpc.CallOption) (*JobsReply, error) {
|
| + out := new(JobsReply)
|
| + err := grpc.Invoke(ctx, "/scheduler.Scheduler/GetJobs", 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.
|
| + GetJobs(context.Context, *JobsRequest) (*JobsReply, error)
|
| }
|
|
|
| func RegisterSchedulerServer(s prpc.Registrar, srv SchedulerServer) {
|
| s.RegisterService(&_Scheduler_serviceDesc, srv)
|
| }
|
|
|
| +func _Scheduler_GetJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
| + in := new(JobsRequest)
|
| + if err := dec(in); err != nil {
|
| + return nil, err
|
| + }
|
| + if interceptor == nil {
|
| + return srv.(SchedulerServer).GetJobs(ctx, in)
|
| + }
|
| + info := &grpc.UnaryServerInfo{
|
| + Server: srv,
|
| + FullMethod: "/scheduler.Scheduler/GetJobs",
|
| + }
|
| + handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
| + return srv.(SchedulerServer).GetJobs(ctx, req.(*JobsRequest))
|
| + }
|
| + return interceptor(ctx, in, info, handler)
|
| +}
|
| +
|
| var _Scheduler_serviceDesc = grpc.ServiceDesc{
|
| ServiceName: "scheduler.Scheduler",
|
| HandlerType: (*SchedulerServer)(nil),
|
| - Methods: []grpc.MethodDesc{},
|
| - Streams: []grpc.StreamDesc{},
|
| - Metadata: "github.com/luci/luci-go/scheduler/api/scheduler/v1/scheduler.proto",
|
| + Methods: []grpc.MethodDesc{
|
| + {
|
| + MethodName: "GetJobs",
|
| + Handler: _Scheduler_GetJobs_Handler,
|
| + },
|
| + },
|
| + Streams: []grpc.StreamDesc{},
|
| + Metadata: "github.com/luci/luci-go/scheduler/api/scheduler/v1/scheduler.proto",
|
| }
|
|
|
| func init() {
|
| @@ -83,11 +228,22 @@ func init() {
|
| }
|
|
|
| var fileDescriptor0 = []byte{
|
| - // 87 bytes of a gzipped FileDescriptorProto
|
| - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4a, 0xcf, 0x2c, 0xc9,
|
| - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x29, 0x4d, 0xce, 0x04, 0x13, 0xba, 0xe9, 0xf9,
|
| - 0xfa, 0xc5, 0xc9, 0x19, 0xa9, 0x29, 0xa5, 0x39, 0xa9, 0x45, 0xfa, 0x89, 0x05, 0x99, 0x48, 0xbc,
|
| - 0x32, 0x43, 0x04, 0x47, 0xaf, 0xa0, 0x28, 0xbf, 0x24, 0x5f, 0x88, 0x13, 0x2e, 0x60, 0xc4, 0xcd,
|
| - 0xc5, 0x19, 0x0c, 0xe3, 0x24, 0xb1, 0x81, 0xa5, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52,
|
| - 0x17, 0x2a, 0x0f, 0x64, 0x00, 0x00, 0x00,
|
| + // 259 bytes of a gzipped FileDescriptorProto
|
| + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xc1, 0x4f, 0x83, 0x30,
|
| + 0x18, 0xc5, 0x03, 0x43, 0x37, 0x3e, 0x8c, 0x87, 0x4f, 0xa3, 0xcd, 0x0e, 0x86, 0x70, 0x11, 0x63,
|
| + 0x84, 0x88, 0x07, 0x3d, 0x1b, 0x13, 0x93, 0x1d, 0xd9, 0xc1, 0xf3, 0x0a, 0xcd, 0xe8, 0x44, 0x5b,
|
| + 0x69, 0x6b, 0xb2, 0x93, 0xff, 0xba, 0x59, 0xb1, 0x1b, 0xc4, 0x4b, 0xd3, 0xf7, 0xfa, 0xfa, 0x7e,
|
| + 0xed, 0x07, 0xcf, 0x6b, 0xae, 0x1b, 0x43, 0xb3, 0x4a, 0x7c, 0xe4, 0xad, 0xa9, 0xb8, 0x5d, 0xee,
|
| + 0xd6, 0x22, 0x57, 0x55, 0xc3, 0x6a, 0xd3, 0xb2, 0x2e, 0x5f, 0x49, 0x3e, 0x50, 0xdf, 0xf7, 0x07,
|
| + 0x91, 0xc9, 0x4e, 0x68, 0x81, 0xe1, 0xde, 0x48, 0xae, 0x21, 0x5a, 0x08, 0xaa, 0x4a, 0xf6, 0x65,
|
| + 0x98, 0xd2, 0x48, 0x60, 0x2a, 0x3b, 0xb1, 0x61, 0x95, 0x26, 0x5e, 0xec, 0xa5, 0x61, 0xe9, 0x64,
|
| + 0xf2, 0x04, 0x61, 0x1f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