jobstore

package
v0.0.0-...-41f210e Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobStore

type JobStore struct {
	// pool of redis connections for use by threads
	ConnPool *redis.Pool
	// copy of ids of all jobs stored in redis instance
	JobIds []string
}

func New

func New(host string) (*JobStore, error)

func (*JobStore) Delete

func (jh *JobStore) Delete(id string) error

delete a job in the store

func (*JobStore) Read

func (jh *JobStore) Read(id string) (*job.Job, error)

read a job from store

func (*JobStore) UpdateState

func (jh *JobStore) UpdateState(id string, newState string) error

update state for a job in store

func (*JobStore) UpdateType

func (jh *JobStore) UpdateType(id string, newType string) error

update type for a job in store

func (*JobStore) Write

func (jh *JobStore) Write(Type string, State string) (*string, error)

write a new job to the store

Jump to

Keyboard shortcuts

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