Documentation
¶
Index ¶
- func ToLogWriter(service *Service) execution.LogWriter
- func ToStatusWriter(service *Service) execution.StateWriter
- type DbContext
- type LogWriterFn
- type QueryResult
- type Record
- type RecordEntity
- type Repository
- type Service
- func (service *Service) Create(ctx context.Context, job execution.Job) error
- func (service *Service) Find(ctx context.Context, projectID string, q dal.Query) (QueryResult, error)
- func (service *Service) Get(ctx context.Context, projectID, jobID string) (RecordEntity, error)
- func (service *Service) Log(ctx context.Context, projectID, jobID string, data []byte) (dal.Entity, error)
- func (service *Service) Update(ctx context.Context, state execution.State) (dal.Entity, error)
- type StatusWriterFn
- type UpdateRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToLogWriter ¶
func ToStatusWriter ¶
func ToStatusWriter(service *Service) execution.StateWriter
Types ¶
type DbContext ¶
type DbContext interface {
GetHistoryRepository(projectID string) (Repository, error)
}
type LogWriterFn ¶
type QueryResult ¶
type QueryResult struct { dal.QueryResult Data []RecordEntity }
type Record ¶
type Record struct { JobID string `json:"job_id"` ScriptID string `json:"script_id"` ScriptRev string `json:"script_rev"` Params map[string]interface{} `json:"params"` Status execution.Status `json:"status"` CausedBy execution.Cause `json:"cause"` StartedAt time.Time `json:"started_at"` EndedAt time.Time `json:"ended_at"` Logs []string `json:"logs"` Error error `json:"error"` }
Represents a job history record It gets updated during the job life cycle
type RecordEntity ¶
type Repository ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
type StatusWriterFn ¶
type UpdateRecord ¶
Click to show internal directories.
Click to hide internal directories.