redis

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis struct {
	*rs.RedisClient
}

Redis represents a redis client.

func New

func New(url string, poolSize, minIdleConns int, keyPrefix string) *Redis

New returns a redis client.

func (*Redis) CreateJob

func (rs *Redis) CreateJob(j *domain.Job) error

CreateJob adds a new job to the repository.

func (*Redis) CreateJobResult

func (rs *Redis) CreateJobResult(result *domain.JobResult) error

CreateJobResult adds a new job result to the repository.

func (*Redis) CreatePipeline added in v0.8.0

func (rs *Redis) CreatePipeline(p *domain.Pipeline) error

CreatePipeline adds a new pipeline and of its jobs to the repository.

func (*Redis) DeleteJob

func (rs *Redis) DeleteJob(id string) error

DeleteJob deletes a job from the repository.

func (*Redis) DeleteJobResult

func (rs *Redis) DeleteJobResult(jobID string) error

DeleteJobResult deletes a job result from the repository.

func (*Redis) DeletePipeline added in v0.8.0

func (rs *Redis) DeletePipeline(id string) error

DeletePipeline deletes a pipeline and all its jobs from the repository.

func (*Redis) GetDueJobs

func (rs *Redis) GetDueJobs() ([]*domain.Job, error)

GetDueJobs fetches all jobs scheduled to run before now and have not been scheduled yet.

func (*Redis) GetJob

func (rs *Redis) GetJob(id string) (*domain.Job, error)

GetJob fetches a job from the repository.

func (*Redis) GetJobResult

func (rs *Redis) GetJobResult(jobID string) (*domain.JobResult, error)

GetJobResult fetches a job result from the repository.

func (*Redis) GetJobs

func (rs *Redis) GetJobs(status domain.JobStatus) ([]*domain.Job, error)

GetJobs fetches all jobs from the repository, optionally filters the jobs by status.

func (*Redis) GetJobsByPipelineID added in v0.8.0

func (rs *Redis) GetJobsByPipelineID(pipelineID string) ([]*domain.Job, error)

GetJobsByPipelineID fetches the jobs of the specified pipeline.

func (*Redis) GetPipeline added in v0.8.0

func (rs *Redis) GetPipeline(id string) (*domain.Pipeline, error)

GetPipeline fetches a pipeline from the repository.

func (*Redis) GetPipelines added in v0.8.0

func (rs *Redis) GetPipelines(status domain.JobStatus) ([]*domain.Pipeline, error)

GetPipelines fetches all pipelines from the repository, optionally filters the pipelines by status.

func (*Redis) UpdateJob

func (rs *Redis) UpdateJob(id string, j *domain.Job) error

UpdateJob updates a job to the repository.

func (*Redis) UpdateJobResult

func (rs *Redis) UpdateJobResult(jobID string, result *domain.JobResult) error

UpdateJobResult updates a job result to the repository.

func (*Redis) UpdatePipeline added in v0.8.0

func (rs *Redis) UpdatePipeline(id string, p *domain.Pipeline) error

UpdatePipeline updates a pipeline to the repository.

Jump to

Keyboard shortcuts

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