Skip to content
Snippets Groups Projects
Select Git revision
  • 3124925c43df5432cbb0b846f8ff8ef028b7f2ac
  • master default protected
  • 1.31
  • 4.24.3
  • 4.24.2
  • 4.24.1
  • 4.24.0
  • 4.23.6
  • 4.23.5
  • 4.23.4
  • 4.23.3
  • 4.23.2
  • 4.23.1
  • 4.23.0
  • 4.22.3
  • 4.22.2
  • 4.22.1
  • 4.22.0
  • 4.21.0
  • 4.20.1
  • 4.20.0
  • 4.19.0
  • 4.18.0
23 results

dom.mjs

Blame
  • runnable.go 536 B
    // Copyright 2023 schukai GmbH
    // SPDX-License-Identifier: AGPL-3.0
    
    package jobqueue
    
    import (
    	"context"
    )
    
    type ResultStatus int
    
    const (
    	ResultStatusSuccess ResultStatus = iota
    	ResultStatusFailed
    )
    
    type RunGenericResult interface {
    	GetStatus() ResultStatus
    }
    
    type RunResult[T any] struct {
    	Status ResultStatus
    	Data   T
    }
    
    func (r RunResult[T]) GetStatus() ResultStatus {
    	return r.Status
    }
    
    type Runnable[T any] interface {
    	Run(ctx context.Context) (RunResult[T], error)
    	GetType() string
    	GetPersistence() RunnableImport
    }