Documentation ¶
Index ¶
- type Manager
- type MockManager
- func (_m *MockManager) GetJob(jobID string) (*job.Stats, error)
- func (_m *MockManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error)
- func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]*job.Stats, int64, error)
- func (_m *MockManager) GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64, error)
- func (_m *MockManager) SaveJob(_a0 *job.Stats) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // Get the stats data of all kinds of jobs. // Data returned by pagination. // // Arguments: // q *query.Parameter : the query parameters // // Returns: // The matched job stats list // The total number of the jobs // Non nil error if any issues meet GetJobs(q *query.Parameter) ([]*job.Stats, int64, error) // Get the executions of the specified periodic job by pagination // // Arguments: // pID: ID of the periodic job // q *query.Parameter: query parameters // // Returns: // The matched job stats list, // The total number of the executions, // Non nil error if any issues meet. GetPeriodicExecution(pID string, q *query.Parameter) ([]*job.Stats, int64, error) // Get the scheduled jobs // // Arguments: // q *query.Parameter: query parameters // // Returns: // The matched job stats list, // The total number of the executions, // Non nil error if any issues meet. GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64, error) // Get the stats of the specified job // // Arguments: // jobID string: ID of the job // // Returns: // The job stats // Non nil error if any issues meet GetJob(jobID string) (*job.Stats, error) // Save the job stats // // Arguments: // job *job.Stats: the saving job stats // // Returns: // Non nil error if any issues meet SaveJob(job *job.Stats) error }
Manager defines the related operations to handle the management of job stats.
type MockManager ¶
MockManager is an autogenerated mock type for the Manager type
func NewMockManager ¶
func NewMockManager(t interface { mock.TestingT Cleanup(func()) }) *MockManager
NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockManager) GetJob ¶
func (_m *MockManager) GetJob(jobID string) (*job.Stats, error)
GetJob provides a mock function with given fields: jobID
func (*MockManager) GetPeriodicExecution ¶
func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]*job.Stats, int64, error)
GetPeriodicExecution provides a mock function with given fields: pID, q
func (*MockManager) GetScheduledJobs ¶
GetScheduledJobs provides a mock function with given fields: q
Click to show internal directories.
Click to hide internal directories.