worker

package
v0.0.0-...-d73d392 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunningStatus string = "running"
	FailedStatus  string = "failed"
	SuccessStatus string = "success"
)

Variables

View Source
var (
	ReportWorkflowName = cereal.NewWorkflowName("report-workflow")
	ReportTaskName     = cereal.NewTaskName("report-task")
)

Functions

func InitCerealManager

func InitCerealManager(cerealManager *cereal.Manager, workerCount int, db *storage.DB, objStoreClient *minio.Client,
	objBucket string, concurrentRequests int, complianceReportingClient reporting.ReportingServiceClient) error

func WaivedStr

func WaivedStr(data *inspec.WaiverData) (str string)

WaivedStr returns a string label based on the control waived status

Types

type CustomReportChan

type CustomReportChan struct {
	// contains filtered or unexported fields
}

type CustomReportErrorChan

type CustomReportErrorChan struct {
	// contains filtered or unexported fields
}

type GenerateReportParameters

type GenerateReportParameters struct {
	JobID            string
	StartTime        *time.Time
	EndTime          *time.Time
	RequestToProcess *report_manager.CustomReportRequest
	ReportSize       int64
	PreSignedURL     string
}

type GenerateReportTask

type GenerateReportTask struct {
	ObjStoreClient            objstore.ObjectStore
	ObjBucketName             string
	ComplianceReportingClient reporting.ReportingServiceClient
	ConcurrentRequests        int
}

func (*GenerateReportTask) Run

func (t *GenerateReportTask) Run(ctx context.Context, task cereal.Task) (interface{}, error)

type ReportWorkflow

type ReportWorkflow struct {
	DB *storage.DB
}

func (*ReportWorkflow) OnCancel

func (*ReportWorkflow) OnStart

func (*ReportWorkflow) OnTaskComplete

type ReportWorkflowParameters

type ReportWorkflowParameters struct {
	JobID            string
	RequestorID      string
	Retries          int
	RequestToProcess *report_manager.CustomReportRequest
}

type ReportWorkflowPayload

type ReportWorkflowPayload struct {
	JobID       string
	Status      string
	RetriesLeft int
	StartTime   *time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL