Documentation ¶
Overview ¶
Package jobs is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterJobsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterJobsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client JobsServiceClient) error
- func RegisterJobsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterJobsServiceServer(s *grpc.Server, srv JobsServiceServer)
- type Id
- func (*Id) Descriptor() ([]byte, []int)
- func (m *Id) GetId() string
- func (*Id) ProtoMessage()
- func (m *Id) Reset()
- func (m *Id) String() string
- func (m *Id) XXX_DiscardUnknown()
- func (m *Id) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Id) XXX_Merge(src proto.Message)
- func (m *Id) XXX_Size() int
- func (m *Id) XXX_Unmarshal(b []byte) error
- type Job
- func (*Job) Descriptor() ([]byte, []int)
- func (m *Job) GetDeleted() bool
- func (m *Job) GetEndTime() *timestamp.Timestamp
- func (m *Job) GetId() string
- func (m *Job) GetJobCount() int32
- func (m *Job) GetName() string
- func (m *Job) GetNodeCount() int32
- func (m *Job) GetNodeSelectors() []*ManagerFilter
- func (m *Job) GetNodes() []string
- func (m *Job) GetParentId() string
- func (m *Job) GetProfileCount() int32
- func (m *Job) GetProfiles() []string
- func (m *Job) GetRecurrence() string
- func (m *Job) GetResults() []*ResultsRow
- func (m *Job) GetRetries() int32
- func (m *Job) GetRetriesLeft() int32
- func (m *Job) GetScheduledTime() *timestamp.Timestamp
- func (m *Job) GetStartTime() *timestamp.Timestamp
- func (m *Job) GetStatus() string
- func (m *Job) GetTags() []*common.Kv
- func (m *Job) GetTimeout() int32
- func (m *Job) GetType() string
- func (*Job) ProtoMessage()
- func (m *Job) Reset()
- func (m *Job) String() string
- func (m *Job) XXX_DiscardUnknown()
- func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Job) XXX_Merge(src proto.Message)
- func (m *Job) XXX_Size() int
- func (m *Job) XXX_Unmarshal(b []byte) error
- type Jobs
- func (*Jobs) Descriptor() ([]byte, []int)
- func (m *Jobs) GetJobs() []*Job
- func (m *Jobs) GetTotal() int32
- func (*Jobs) ProtoMessage()
- func (m *Jobs) Reset()
- func (m *Jobs) String() string
- func (m *Jobs) XXX_DiscardUnknown()
- func (m *Jobs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Jobs) XXX_Merge(src proto.Message)
- func (m *Jobs) XXX_Size() int
- func (m *Jobs) XXX_Unmarshal(b []byte) error
- type JobsServiceClient
- type JobsServiceServer
- type JobsServiceServerMock
- func (m *JobsServiceServerMock) Create(ctx context.Context, req *Job) (*Id, error)
- func (m *JobsServiceServerMock) Delete(ctx context.Context, req *Id) (*empty.Empty, error)
- func (m *JobsServiceServerMock) List(ctx context.Context, req *Query) (*Jobs, error)
- func (m *JobsServiceServerMock) Read(ctx context.Context, req *Id) (*Job, error)
- func (m *JobsServiceServerMock) Rerun(ctx context.Context, req *Id) (*RerunResponse, error)
- func (m *JobsServiceServerMock) Reset()
- func (m *JobsServiceServerMock) Update(ctx context.Context, req *Job) (*empty.Empty, error)
- type ManagerFilter
- func (*ManagerFilter) Descriptor() ([]byte, []int)
- func (m *ManagerFilter) GetFilters() []*common.Filter
- func (m *ManagerFilter) GetManagerId() string
- func (*ManagerFilter) ProtoMessage()
- func (m *ManagerFilter) Reset()
- func (m *ManagerFilter) String() string
- func (m *ManagerFilter) XXX_DiscardUnknown()
- func (m *ManagerFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ManagerFilter) XXX_Merge(src proto.Message)
- func (m *ManagerFilter) XXX_Size() int
- func (m *ManagerFilter) XXX_Unmarshal(b []byte) error
- type Query
- func (*Query) Descriptor() ([]byte, []int)
- func (m *Query) GetFilters() []*common.Filter
- func (m *Query) GetOrder() Query_OrderType
- func (m *Query) GetPage() int32
- func (m *Query) GetPerPage() int32
- func (m *Query) GetSort() string
- func (*Query) ProtoMessage()
- func (m *Query) Reset()
- func (m *Query) String() string
- func (m *Query) XXX_DiscardUnknown()
- func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Query) XXX_Merge(src proto.Message)
- func (m *Query) XXX_Size() int
- func (m *Query) XXX_Unmarshal(b []byte) error
- type Query_OrderType
- type RerunResponse
- func (*RerunResponse) Descriptor() ([]byte, []int)
- func (*RerunResponse) ProtoMessage()
- func (m *RerunResponse) Reset()
- func (m *RerunResponse) String() string
- func (m *RerunResponse) XXX_DiscardUnknown()
- func (m *RerunResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RerunResponse) XXX_Merge(src proto.Message)
- func (m *RerunResponse) XXX_Size() int
- func (m *RerunResponse) XXX_Unmarshal(b []byte) error
- type ResultsRow
- func (*ResultsRow) Descriptor() ([]byte, []int)
- func (m *ResultsRow) GetEndTime() *timestamp.Timestamp
- func (m *ResultsRow) GetJobId() string
- func (m *ResultsRow) GetNodeId() string
- func (m *ResultsRow) GetReportId() string
- func (m *ResultsRow) GetResult() string
- func (m *ResultsRow) GetStartTime() *timestamp.Timestamp
- func (m *ResultsRow) GetStatus() string
- func (*ResultsRow) ProtoMessage()
- func (m *ResultsRow) Reset()
- func (m *ResultsRow) String() string
- func (m *ResultsRow) XXX_DiscardUnknown()
- func (m *ResultsRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ResultsRow) XXX_Merge(src proto.Message)
- func (m *ResultsRow) XXX_Size() int
- func (m *ResultsRow) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var Query_OrderType_name = map[int32]string{
0: "ASC",
1: "DESC",
}
var Query_OrderType_value = map[string]int32{
"ASC": 0,
"DESC": 1,
}
Functions ¶
func RegisterJobsServiceHandler ¶
func RegisterJobsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterJobsServiceHandler registers the http handlers for service JobsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterJobsServiceHandlerClient ¶
func RegisterJobsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client JobsServiceClient) error
RegisterJobsServiceHandlerClient registers the http handlers for service JobsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "JobsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "JobsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "JobsServiceClient" to call the correct interceptors.
func RegisterJobsServiceHandlerFromEndpoint ¶
func RegisterJobsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterJobsServiceHandlerFromEndpoint is same as RegisterJobsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterJobsServiceServer ¶
func RegisterJobsServiceServer(s *grpc.Server, srv JobsServiceServer)
Types ¶
type Id ¶
type Id struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Id) Descriptor ¶
func (*Id) ProtoMessage ¶
func (*Id) ProtoMessage()
func (*Id) XXX_DiscardUnknown ¶
func (m *Id) XXX_DiscardUnknown()
func (*Id) XXX_Unmarshal ¶
type Job ¶
type Job struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` Timeout int32 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"` Tags []*common.Kv `protobuf:"bytes,20,rep,name=tags,proto3" json:"tags,omitempty"` StartTime *timestamp.Timestamp `protobuf:"bytes,21,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime *timestamp.Timestamp `protobuf:"bytes,22,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` Status string `protobuf:"bytes,23,opt,name=status,proto3" json:"status,omitempty"` Retries int32 `protobuf:"varint,26,opt,name=retries,proto3" json:"retries,omitempty"` RetriesLeft int32 `protobuf:"varint,27,opt,name=retries_left,json=retriesLeft,proto3" json:"retries_left,omitempty"` Results []*ResultsRow `protobuf:"bytes,28,rep,name=results,proto3" json:"results,omitempty"` Nodes []string `protobuf:"bytes,100,rep,name=nodes,proto3" json:"nodes,omitempty"` Profiles []string `protobuf:"bytes,101,rep,name=profiles,proto3" json:"profiles,omitempty"` NodeCount int32 `protobuf:"varint,102,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` ProfileCount int32 `protobuf:"varint,103,opt,name=profile_count,json=profileCount,proto3" json:"profile_count,omitempty"` NodeSelectors []*ManagerFilter `protobuf:"bytes,104,rep,name=node_selectors,json=nodeSelectors,proto3" json:"node_selectors,omitempty"` ScheduledTime *timestamp.Timestamp `protobuf:"bytes,105,opt,name=scheduled_time,json=scheduledTime,proto3" json:"scheduled_time,omitempty"` Recurrence string `protobuf:"bytes,106,opt,name=recurrence,proto3" json:"recurrence,omitempty"` ParentId string `protobuf:"bytes,107,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` JobCount int32 `protobuf:"varint,108,opt,name=job_count,json=jobCount,proto3" json:"job_count,omitempty"` Deleted bool `protobuf:"varint,109,opt,name=deleted,proto3" json:"deleted,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Job) Descriptor ¶
func (*Job) GetDeleted ¶
func (*Job) GetEndTime ¶
func (*Job) GetJobCount ¶
func (*Job) GetNodeCount ¶
func (*Job) GetNodeSelectors ¶
func (m *Job) GetNodeSelectors() []*ManagerFilter
func (*Job) GetParentId ¶
func (*Job) GetProfileCount ¶
func (*Job) GetProfiles ¶
func (*Job) GetRecurrence ¶
func (*Job) GetResults ¶
func (m *Job) GetResults() []*ResultsRow
func (*Job) GetRetries ¶
func (*Job) GetRetriesLeft ¶
func (*Job) GetScheduledTime ¶
func (*Job) GetStartTime ¶
func (*Job) GetTimeout ¶
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) XXX_DiscardUnknown ¶
func (m *Job) XXX_DiscardUnknown()
func (*Job) XXX_Unmarshal ¶
type Jobs ¶
type Jobs struct { Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` Total int32 `protobuf:"varint,20,opt,name=total,proto3" json:"total,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Jobs) Descriptor ¶
func (*Jobs) ProtoMessage ¶
func (*Jobs) ProtoMessage()
func (*Jobs) XXX_DiscardUnknown ¶
func (m *Jobs) XXX_DiscardUnknown()
func (*Jobs) XXX_Unmarshal ¶
type JobsServiceClient ¶
type JobsServiceClient interface { Create(ctx context.Context, in *Job, opts ...grpc.CallOption) (*Id, error) Read(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Job, error) Update(ctx context.Context, in *Job, opts ...grpc.CallOption) (*empty.Empty, error) Delete(ctx context.Context, in *Id, opts ...grpc.CallOption) (*empty.Empty, error) List(ctx context.Context, in *Query, opts ...grpc.CallOption) (*Jobs, error) Rerun(ctx context.Context, in *Id, opts ...grpc.CallOption) (*RerunResponse, error) }
JobsServiceClient is the client API for JobsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewJobsServiceClient ¶
func NewJobsServiceClient(cc *grpc.ClientConn) JobsServiceClient
type JobsServiceServer ¶
type JobsServiceServer interface { Create(context.Context, *Job) (*Id, error) Read(context.Context, *Id) (*Job, error) Update(context.Context, *Job) (*empty.Empty, error) Delete(context.Context, *Id) (*empty.Empty, error) List(context.Context, *Query) (*Jobs, error) Rerun(context.Context, *Id) (*RerunResponse, error) }
JobsServiceServer is the server API for JobsService service.
type JobsServiceServerMock ¶
type JobsServiceServerMock struct { CreateFunc func(context.Context, *Job) (*Id, error) ReadFunc func(context.Context, *Id) (*Job, error) UpdateFunc func(context.Context, *Job) (*empty.Empty, error) DeleteFunc func(context.Context, *Id) (*empty.Empty, error) ListFunc func(context.Context, *Query) (*Jobs, error) RerunFunc func(context.Context, *Id) (*RerunResponse, error) // contains filtered or unexported fields }
JobsServiceServerMock is the mock-what-you-want struct that stubs all not-overridden methods with "not implemented" returns
func NewJobsServiceServerMock ¶
func NewJobsServiceServerMock() *JobsServiceServerMock
NewJobsServiceServerMock gives you a fresh instance of JobsServiceServerMock.
func NewJobsServiceServerMockWithoutValidation ¶
func NewJobsServiceServerMockWithoutValidation() *JobsServiceServerMock
NewJobsServiceServerMockWithoutValidation gives you a fresh instance of JobsServiceServerMock which does not attempt to validate requests before passing them to their respective '*Func'.
func (*JobsServiceServerMock) Rerun ¶
func (m *JobsServiceServerMock) Rerun(ctx context.Context, req *Id) (*RerunResponse, error)
func (*JobsServiceServerMock) Reset ¶
func (m *JobsServiceServerMock) Reset()
Reset resets all overridden functions
type ManagerFilter ¶
type ManagerFilter struct { ManagerId string `protobuf:"bytes,1,opt,name=manager_id,json=managerId,proto3" json:"manager_id,omitempty"` Filters []*common.Filter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ManagerFilter) Descriptor ¶
func (*ManagerFilter) Descriptor() ([]byte, []int)
func (*ManagerFilter) GetFilters ¶
func (m *ManagerFilter) GetFilters() []*common.Filter
func (*ManagerFilter) GetManagerId ¶
func (m *ManagerFilter) GetManagerId() string
func (*ManagerFilter) ProtoMessage ¶
func (*ManagerFilter) ProtoMessage()
func (*ManagerFilter) Reset ¶
func (m *ManagerFilter) Reset()
func (*ManagerFilter) String ¶
func (m *ManagerFilter) String() string
func (*ManagerFilter) XXX_DiscardUnknown ¶
func (m *ManagerFilter) XXX_DiscardUnknown()
func (*ManagerFilter) XXX_Marshal ¶
func (m *ManagerFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ManagerFilter) XXX_Merge ¶
func (dst *ManagerFilter) XXX_Merge(src proto.Message)
func (*ManagerFilter) XXX_Size ¶
func (m *ManagerFilter) XXX_Size() int
func (*ManagerFilter) XXX_Unmarshal ¶
func (m *ManagerFilter) XXX_Unmarshal(b []byte) error
type Query ¶
type Query struct { Filters []*common.Filter `protobuf:"bytes,20,rep,name=filters,proto3" json:"filters,omitempty"` Order Query_OrderType `` /* 131-byte string literal not displayed */ Sort string `protobuf:"bytes,22,opt,name=sort,proto3" json:"sort,omitempty"` Page int32 `protobuf:"varint,23,opt,name=page,proto3" json:"page,omitempty"` PerPage int32 `protobuf:"varint,24,opt,name=per_page,json=perPage,proto3" json:"per_page,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Query) Descriptor ¶
func (*Query) GetFilters ¶
func (*Query) GetOrder ¶
func (m *Query) GetOrder() Query_OrderType
func (*Query) GetPerPage ¶
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) XXX_DiscardUnknown ¶
func (m *Query) XXX_DiscardUnknown()
func (*Query) XXX_Marshal ¶
func (*Query) XXX_Unmarshal ¶
type Query_OrderType ¶
type Query_OrderType int32
const ( Query_ASC Query_OrderType = 0 Query_DESC Query_OrderType = 1 )
func (Query_OrderType) EnumDescriptor ¶
func (Query_OrderType) EnumDescriptor() ([]byte, []int)
func (Query_OrderType) String ¶
func (x Query_OrderType) String() string
type RerunResponse ¶
type RerunResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RerunResponse) Descriptor ¶
func (*RerunResponse) Descriptor() ([]byte, []int)
func (*RerunResponse) ProtoMessage ¶
func (*RerunResponse) ProtoMessage()
func (*RerunResponse) Reset ¶
func (m *RerunResponse) Reset()
func (*RerunResponse) String ¶
func (m *RerunResponse) String() string
func (*RerunResponse) XXX_DiscardUnknown ¶
func (m *RerunResponse) XXX_DiscardUnknown()
func (*RerunResponse) XXX_Marshal ¶
func (m *RerunResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RerunResponse) XXX_Merge ¶
func (dst *RerunResponse) XXX_Merge(src proto.Message)
func (*RerunResponse) XXX_Size ¶
func (m *RerunResponse) XXX_Size() int
func (*RerunResponse) XXX_Unmarshal ¶
func (m *RerunResponse) XXX_Unmarshal(b []byte) error
type ResultsRow ¶
type ResultsRow struct { NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` ReportId string `protobuf:"bytes,2,opt,name=report_id,json=reportId,proto3" json:"report_id,omitempty"` Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` Result string `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` JobId string `protobuf:"bytes,5,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` StartTime *timestamp.Timestamp `protobuf:"bytes,20,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime *timestamp.Timestamp `protobuf:"bytes,21,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ResultsRow) Descriptor ¶
func (*ResultsRow) Descriptor() ([]byte, []int)
func (*ResultsRow) GetEndTime ¶
func (m *ResultsRow) GetEndTime() *timestamp.Timestamp
func (*ResultsRow) GetJobId ¶
func (m *ResultsRow) GetJobId() string
func (*ResultsRow) GetNodeId ¶
func (m *ResultsRow) GetNodeId() string
func (*ResultsRow) GetReportId ¶
func (m *ResultsRow) GetReportId() string
func (*ResultsRow) GetResult ¶
func (m *ResultsRow) GetResult() string
func (*ResultsRow) GetStartTime ¶
func (m *ResultsRow) GetStartTime() *timestamp.Timestamp
func (*ResultsRow) GetStatus ¶
func (m *ResultsRow) GetStatus() string
func (*ResultsRow) ProtoMessage ¶
func (*ResultsRow) ProtoMessage()
func (*ResultsRow) Reset ¶
func (m *ResultsRow) Reset()
func (*ResultsRow) String ¶
func (m *ResultsRow) String() string
func (*ResultsRow) XXX_DiscardUnknown ¶
func (m *ResultsRow) XXX_DiscardUnknown()
func (*ResultsRow) XXX_Marshal ¶
func (m *ResultsRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResultsRow) XXX_Merge ¶
func (dst *ResultsRow) XXX_Merge(src proto.Message)
func (*ResultsRow) XXX_Size ¶
func (m *ResultsRow) XXX_Size() int
func (*ResultsRow) XXX_Unmarshal ¶
func (m *ResultsRow) XXX_Unmarshal(b []byte) error