inmemoryprovider

package
v0.0.0-...-5b7b456 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemoryJobBackendProvider

func NewInMemoryJobBackendProvider(logger *zap.Logger, conf *config.Config) (jobbackendprovider.IJobBackendProvider, error)

Types

type DBFileStorage

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

func NewDBFileStorage

func NewDBFileStorage(logger *zap.Logger, directory string, filename string) *DBFileStorage

func (*DBFileStorage) GetFilePath

func (s *DBFileStorage) GetFilePath() string

func (*DBFileStorage) Init

func (s *DBFileStorage) Init() error

func (*DBFileStorage) Load

func (s *DBFileStorage) Load() (job.JobMap, error)

func (*DBFileStorage) Save

func (s *DBFileStorage) Save(jobs job.JobMap) error

type DBStorageFileStruct

type DBStorageFileStruct struct {
	Jobs job.JobMap `json:"jobs"`
}

type InMemoryJobBackendProvider

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

func (*InMemoryJobBackendProvider) Healthcheck

func (p *InMemoryJobBackendProvider) Healthcheck() bool

func (*InMemoryJobBackendProvider) Init

func (p *InMemoryJobBackendProvider) Init(notifChan chan jobbackendprovider.Event) error

func (*InMemoryJobBackendProvider) JobExists

func (p *InMemoryJobBackendProvider) JobExists(jobUUID job.JobUUID) (bool, error)

func (*InMemoryJobBackendProvider) LoadJobs

func (p *InMemoryJobBackendProvider) LoadJobs() (job.JobMap, error)

func (*InMemoryJobBackendProvider) NotifyChange

func (p *InMemoryJobBackendProvider) NotifyChange(event jobbackendprovider.Event)

func (*InMemoryJobBackendProvider) OnAllResourcesUnlocked

func (p *InMemoryJobBackendProvider) OnAllResourcesUnlocked() error

func (*InMemoryJobBackendProvider) OnJobCanceled

func (p *InMemoryJobBackendProvider) OnJobCanceled(j *job.Job) error

func (*InMemoryJobBackendProvider) OnJobCreated

func (p *InMemoryJobBackendProvider) OnJobCreated(j *job.Job) error

func (*InMemoryJobBackendProvider) OnJobDeleted

func (p *InMemoryJobBackendProvider) OnJobDeleted(jobUUID job.JobUUID) error

func (*InMemoryJobBackendProvider) OnJobEnqueued

func (p *InMemoryJobBackendProvider) OnJobEnqueued(j *job.Job) error

func (*InMemoryJobBackendProvider) OnJobStarted

func (p *InMemoryJobBackendProvider) OnJobStarted(j *job.Job) error

func (*InMemoryJobBackendProvider) OnJobSucceeded

func (p *InMemoryJobBackendProvider) OnJobSucceeded(j *job.Job) error

func (*InMemoryJobBackendProvider) OnJobTimeout

func (p *InMemoryJobBackendProvider) OnJobTimeout(j *job.Job) error

func (*InMemoryJobBackendProvider) OnJobsDeleted

func (p *InMemoryJobBackendProvider) OnJobsDeleted() error

func (*InMemoryJobBackendProvider) OnResourceUnlocked

func (p *InMemoryJobBackendProvider) OnResourceUnlocked(j *job.Job, resource string) error

func (*InMemoryJobBackendProvider) Run

func (*InMemoryJobBackendProvider) SaveToFile

func (p *InMemoryJobBackendProvider) SaveToFile() error

func (*InMemoryJobBackendProvider) Stop

Jump to

Keyboard shortcuts

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