Skip to content
Snippets Groups Projects
Select Git revision
  • cf42e31e7fe86db9ebf807152b7af89935b6fff0
  • master default protected
  • 0.5.9
  • 0.5.8
  • 0.5.7
  • 0.5.6
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.17
  • 0.4.16
  • 0.4.15
  • 0.4.14
  • 0.4.13
  • 0.4.12
  • 0.4.11
  • 0.4.10
  • 0.4.9
  • 0.4.8
22 results

go-compile.sh

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
    }