Documentation
¶
Index ¶
- Variables
- type JRClient
- func (c *JRClient) NewJobChain(jc proto.JobChain) error
- func (c *JRClient) RequestStatus(requestId string) (proto.JobChainStatus, error)
- func (c *JRClient) StartRequest(requestId string) error
- func (c *JRClient) StopRequest(requestId string) error
- func (c *JRClient) SysStatRunning() ([]proto.JobStatus, error)
- type JRStatus
- type Job
- func (j *Job) Create(jobArgs map[string]interface{}) error
- func (j *Job) Deserialize(jobArgs []byte) error
- func (j *Job) Name() string
- func (j *Job) Run(jobData map[string]interface{}) (job.Return, error)
- func (j *Job) Serialize() ([]byte, error)
- func (j *Job) Status() string
- func (j *Job) Stop() error
- func (j *Job) Type() string
- type JobFactory
- type RMClient
- func (c *RMClient) CreateJL(requestId string, jl proto.JobLog) error
- func (c *RMClient) CreateRequest(requestId string, args map[string]interface{}) (string, error)
- func (c *RMClient) FinishRequest(requestId string, state byte) error
- func (c *RMClient) GetJL(requestId string) ([]proto.JobLog, error)
- func (c *RMClient) GetJobChain(requestId string) (proto.JobChain, error)
- func (c *RMClient) GetRequest(requestId string) (proto.Request, error)
- func (c *RMClient) RequestList() ([]proto.RequestSpec, error)
- func (c *RMClient) RequestStatus(requestId string) (proto.RequestStatus, error)
- func (c *RMClient) StartRequest(requestId string) error
- func (c *RMClient) StopRequest(requestId string) error
- func (c *RMClient) SysStatRunning() (proto.RunningStatus, error)
- type RMStatus
- type RequestDBAccessor
- func (a *RequestDBAccessor) GetFullJL(requestId string) ([]proto.JobLog, error)
- func (a *RequestDBAccessor) GetJobChain(requestId string) (proto.JobChain, error)
- func (a *RequestDBAccessor) GetLatestJL(requestId, jobId string) (proto.JobLog, error)
- func (a *RequestDBAccessor) GetRequest(requestId string) (proto.Request, error)
- func (a *RequestDBAccessor) GetRequestJobStatuses(requestId string) (proto.JobStatuses, error)
- func (a *RequestDBAccessor) IncrementRequestFinishedJobs(requestId string) error
- func (a *RequestDBAccessor) SaveJL(jl proto.JobLog) error
- func (a *RequestDBAccessor) SaveRequest(req proto.Request, reqParams proto.CreateRequestParams) error
- func (a *RequestDBAccessor) UpdateRequest(req proto.Request) error
- type RequestManager
- func (r *RequestManager) CreateJL(reqId string, jl proto.JobLog) (proto.JobLog, error)
- func (r *RequestManager) CreateRequest(reqParams proto.CreateRequestParams) (proto.Request, error)
- func (r *RequestManager) FinishRequest(reqId string, finishParams proto.FinishRequestParams) error
- func (r *RequestManager) GetFullJL(reqId string) ([]proto.JobLog, error)
- func (r *RequestManager) GetJL(reqId, jobId string) (proto.JobLog, error)
- func (r *RequestManager) GetJobChain(reqId string) (proto.JobChain, error)
- func (r *RequestManager) GetRequest(reqId string) (proto.Request, error)
- func (r *RequestManager) RequestList() []proto.RequestSpec
- func (r *RequestManager) RequestStatus(reqId string) (proto.RequestStatus, error)
- func (r *RequestManager) StartRequest(reqId string) error
- func (r *RequestManager) StopRequest(reqId string) error
- type Runner
- type RunnerFactory
- type Traverser
- type TraverserFactory
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrJRClient = errors.New("forced error in jr client")
)
View Source
var (
ErrJob = errors.New("forced error in job")
)
View Source
var (
ErrRMClient = errors.New("forced error in rm client")
)
View Source
var (
ErrRequestDBAccessor = errors.New("forced error in request dbaccessor")
)
View Source
var (
ErrRequestManager = errors.New("forced error in request manager")
)
View Source
var (
ErrRunner = errors.New("forced error in runner")
)
View Source
var (
ErrTraverser = errors.New("forced error in traverser")
)
Functions ¶
This section is empty.
Types ¶
type JRClient ¶
type JRClient struct {
NewJobChainFunc func(proto.JobChain) error
StartRequestFunc func(string) error
StopRequestFunc func(string) error
RequestStatusFunc func(string) (proto.JobChainStatus, error)
SysStatRunningFunc func() ([]proto.JobStatus, error)
}
func (*JRClient) RequestStatus ¶
func (c *JRClient) RequestStatus(requestId string) (proto.JobChainStatus, error)
func (*JRClient) StartRequest ¶
func (*JRClient) StopRequest ¶
type Job ¶
type Job struct {
CreateErr error
SerializeBytes []byte
SerializeErr error
DeserializeErr error
RunReturn job.Return
RunErr error
RunFunc func(jobData map[string]interface{}) (job.Return, error) // can use this instead of RunErr and RunFunc for more involved mocks
StopErr error
StatusResp string
NameResp string
TypeResp string
CreatedWithArgs map[string]interface{}
SetJobArgs map[string]interface{}
}
func (*Job) Deserialize ¶
type JobFactory ¶
type RMClient ¶
type RMClient struct {
CreateRequestFunc func(string, map[string]interface{}) (string, error)
GetRequestFunc func(string) (proto.Request, error)
StartRequestFunc func(string) error
FinishRequestFunc func(string, byte) error
StopRequestFunc func(string) error
RequestStatusFunc func(string) (proto.RequestStatus, error)
GetJobChainFunc func(string) (proto.JobChain, error)
GetJLFunc func(string) ([]proto.JobLog, error)
CreateJLFunc func(string, proto.JobLog) error
SysStatRunningFunc func() (proto.RunningStatus, error)
}
func (*RMClient) CreateRequest ¶
func (*RMClient) FinishRequest ¶
func (*RMClient) GetJobChain ¶
func (*RMClient) GetRequest ¶
func (*RMClient) RequestList ¶
func (c *RMClient) RequestList() ([]proto.RequestSpec, error)
func (*RMClient) RequestStatus ¶
func (c *RMClient) RequestStatus(requestId string) (proto.RequestStatus, error)
func (*RMClient) StartRequest ¶
func (*RMClient) StopRequest ¶
func (*RMClient) SysStatRunning ¶
func (c *RMClient) SysStatRunning() (proto.RunningStatus, error)
type RMStatus ¶
type RMStatus struct {
RunningFunc func(status.Filter) (proto.RunningStatus, error)
}
type RequestDBAccessor ¶
type RequestDBAccessor struct {
SaveRequestFunc func(proto.Request, proto.CreateRequestParams) error
GetRequestFunc func(string) (proto.Request, error)
UpdateRequestFunc func(proto.Request) error
IncrementRequestFinishedJobsFunc func(string) error
GetRequestJobStatusesFunc func(string) (proto.JobStatuses, error)
GetJobChainFunc func(string) (proto.JobChain, error)
GetLatestJLFunc func(string, string) (proto.JobLog, error)
GetFullJLFunc func(string) ([]proto.JobLog, error)
SaveJLFunc func(proto.JobLog) error
}
func (*RequestDBAccessor) GetFullJL ¶
func (a *RequestDBAccessor) GetFullJL(requestId string) ([]proto.JobLog, error)
func (*RequestDBAccessor) GetJobChain ¶
func (a *RequestDBAccessor) GetJobChain(requestId string) (proto.JobChain, error)
func (*RequestDBAccessor) GetLatestJL ¶
func (a *RequestDBAccessor) GetLatestJL(requestId, jobId string) (proto.JobLog, error)
func (*RequestDBAccessor) GetRequest ¶
func (a *RequestDBAccessor) GetRequest(requestId string) (proto.Request, error)
func (*RequestDBAccessor) GetRequestJobStatuses ¶
func (a *RequestDBAccessor) GetRequestJobStatuses(requestId string) (proto.JobStatuses, error)
func (*RequestDBAccessor) IncrementRequestFinishedJobs ¶
func (a *RequestDBAccessor) IncrementRequestFinishedJobs(requestId string) error
func (*RequestDBAccessor) SaveRequest ¶
func (a *RequestDBAccessor) SaveRequest(req proto.Request, reqParams proto.CreateRequestParams) error
func (*RequestDBAccessor) UpdateRequest ¶
func (a *RequestDBAccessor) UpdateRequest(req proto.Request) error
type RequestManager ¶
type RequestManager struct {
CreateRequestFunc func(proto.CreateRequestParams) (proto.Request, error)
GetRequestFunc func(string) (proto.Request, error)
StartRequestFunc func(string) error
FinishRequestFunc func(string, proto.FinishRequestParams) error
StopRequestFunc func(string) error
RequestStatusFunc func(string) (proto.RequestStatus, error)
GetJobChainFunc func(string) (proto.JobChain, error)
GetJLFunc func(string, string) (proto.JobLog, error)
GetFullJLFunc func(string) ([]proto.JobLog, error)
CreateJLFunc func(string, proto.JobLog) (proto.JobLog, error)
RequestListFunc func() []proto.RequestSpec
}
func (*RequestManager) CreateRequest ¶
func (r *RequestManager) CreateRequest(reqParams proto.CreateRequestParams) (proto.Request, error)
func (*RequestManager) FinishRequest ¶
func (r *RequestManager) FinishRequest(reqId string, finishParams proto.FinishRequestParams) error
func (*RequestManager) GetFullJL ¶
func (r *RequestManager) GetFullJL(reqId string) ([]proto.JobLog, error)
func (*RequestManager) GetJL ¶
func (r *RequestManager) GetJL(reqId, jobId string) (proto.JobLog, error)
func (*RequestManager) GetJobChain ¶
func (r *RequestManager) GetJobChain(reqId string) (proto.JobChain, error)
func (*RequestManager) GetRequest ¶
func (r *RequestManager) GetRequest(reqId string) (proto.Request, error)
func (*RequestManager) RequestList ¶
func (r *RequestManager) RequestList() []proto.RequestSpec
func (*RequestManager) RequestStatus ¶
func (r *RequestManager) RequestStatus(reqId string) (proto.RequestStatus, error)
func (*RequestManager) StartRequest ¶
func (r *RequestManager) StartRequest(reqId string) error
func (*RequestManager) StopRequest ¶
func (r *RequestManager) StopRequest(reqId string) error
type Runner ¶
type Runner struct {
RunReturn byte
RunErr error
RunFunc func(jobData map[string]interface{}) byte // can use this instead of RunErr and RunFunc for more involved mocks
AddedJobData map[string]interface{} // Data to add to jobData.
RunWg *sync.WaitGroup // WaitGroup that gets released from when a runner starts running.
RunBlock chan struct{} // Channel that runner.Run() will block on, if defined.
StopErr error
StatusResp string
// contains filtered or unexported fields
}
type RunnerFactory ¶
Click to show internal directories.
Click to hide internal directories.