Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormStore ¶
type GormStore struct {
// contains filtered or unexported fields
}
func NewGormStore ¶
type JSONResponse ¶ added in v0.6.0
type JSONResponse struct { ID uuid.UUID `json:"jobId"` Status Status `json:"status"` Error string `json:"error"` Result string `json:"result"` TransactionID string `json:"transactionId"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
Job HTTP response
type Job ¶
type Job struct { ID uuid.UUID `gorm:"column:id;primary_key;type:uuid;"` Status Status `gorm:"column:status"` Error string `gorm:"column:error"` Result string `gorm:"column:result"` TransactionID string `gorm:"column:transaction_id"` CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index"` Do Process `gorm:"-"` }
Job database model
func (Job) ToJSONResponse ¶ added in v0.6.0
func (j Job) ToJSONResponse() JSONResponse
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines the API for job HTTP handlers.
type Status ¶
type Status int
func StatusFromText ¶
func (Status) MarshalText ¶
func (*Status) UnmarshalText ¶
type Store ¶
type Store interface { Jobs(datastore.ListOptions) ([]Job, error) Job(id uuid.UUID) (Job, error) InsertJob(*Job) error UpdateJob(*Job) error }
Store manages data regarding jobs.
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶
func (*WorkerPool) AddJob ¶
func (wp *WorkerPool) AddJob(do Process) (*Job, error)
AddJob will try to add a job to the workerpool
func (*WorkerPool) Stop ¶
func (wp *WorkerPool) Stop()
Click to show internal directories.
Click to hide internal directories.