Documentation ¶
Index ¶
- Constants
- Variables
- type CreateTreeFn
- type Meta
- type Metrics
- type Option
- type ProcessingState
- type Service
- func (s *Service) CancelTask(w http.ResponseWriter, r *http.Request)
- func (s *Service) GetName(buf *bytes.Buffer) (string, error)
- func (s *Service) GetTask(w http.ResponseWriter, r *http.Request)
- func (s *Service) Metrics() Metrics
- func (s *Service) NewTask(meta *Meta) (*Task, error)
- func (s *Service) Process(parentCtx context.Context, t *Task) error
- func (s *Service) SaveEAD(r io.Reader, size int64) (*bytes.Buffer, Meta, error)
- func (s *Service) Shutdown(ctx context.Context) error
- func (s *Service) StartWorkers() error
- func (s *Service) Tasks(w http.ResponseWriter, r *http.Request)
- func (s *Service) Upload(w http.ResponseWriter, r *http.Request)
- type Task
- type Transition
Constants ¶
View Source
const ( StateSubmitted ProcessingState = "submitted source EAD" StatePending = "pending processing" StateStarted = "started processing" StateProcessingDescription = "processing description" StateProcessingMetsFiles = "processing METS files" StateProcessingInventories = "processing and indexing inventories" StateInError = "stopped processing with error" StateCancelled = "cancelled processing" StateFinished = "finished processing EAD" )
Variables ¶
View Source
var ( ErrTaskNotFound = errors.New("task not found") ErrTaskAlreadySubmitted = errors.New("task already submitted") )
Functions ¶
This section is empty.
Types ¶
type CreateTreeFn ¶
type Meta ¶
type Meta struct { OrgID string DatasetID string Title string Clevels uint64 DaoLinks uint64 DaoErrors uint64 DaoErrorLinks []string Tags []string RecordsPublished uint64 DigitalObjects uint64 FileSize uint64 Created bool ProcessingDuration time.Duration `json:"processingDuration,omitempty"` ProcessingDurationFmt string `json:"processingDurationFmt,omitempty"` // contains filtered or unexported fields }
type Option ¶
func SetCreateTree ¶
func SetCreateTree(fn CreateTreeFn) Option
func SetDataDir ¶
func SetIndexService ¶
func SetWorkers ¶ added in v0.1.10
type ProcessingState ¶
type ProcessingState string
type Service ¶
type Service struct { CreateTreeFn CreateTreeFn // contains filtered or unexported fields }
func NewService ¶
func (*Service) CancelTask ¶
func (s *Service) CancelTask(w http.ResponseWriter, r *http.Request)
func (*Service) StartWorkers ¶
type Task ¶
type Task struct { ID string `json:"id"` Meta *Meta InState ProcessingState `json:"inState"` ErrorMsg string `json:"errorMsg"` Transitions []*Transition `json:"transitions"` Interrupted bool // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.