Documentation ¶
Index ¶
- Constants
- func Init(cfg *config.Config) (err error)
- type Manager
- func (m *Manager) AddJob(ctx context.Context, poolName string, job engine.Job) error
- func (m *Manager) AddPool(name string, pool engine.Engine, threshold int64)
- func (m *Manager) GetJobByID(ctx context.Context, ID string) ([]engine.Job, error)
- func (m *Manager) PumpFn(name string, pool engine.Engine, threshold int64) func() bool
- func (m *Manager) Shutdown()
- type Metrics
- type Persistence
Constants ¶
View Source
const ( Namespace = "infra" Subsystem = "lmstfy_v2_storage" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) GetJobByID ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics contains storage related metrics
type Persistence ¶
type Persistence interface { // BatchAddJobs write jobs data into secondary storage BatchAddJobs(ctx context.Context, poolName string, jobs []engine.Job) (err error) // GetQueueSize returns the size of data in storage which are due before certain due time GetQueueSize(ctx context.Context, req []*model.DBJobReq) (count map[string]int64, err error) // DelJobs remove job data from storage based on job id DelJobs(ctx context.Context, jobIDs []string) (count int64, err error) // GetReadyJobs return jobs which are ready based on input ready time from data storage GetReadyJobs(ctx context.Context, req *model.DBJobReq) (jobs []engine.Job, err error) // BatchGetJobsByID returns job data by job ID BatchGetJobsByID(ctx context.Context, IDs []string) (jobs []engine.Job, err error) Close() }
Persistence handles requests related to secondary storage
Click to show internal directories.
Click to hide internal directories.