jobstorage

package
v0.0.0-...-fa720cf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobMatch

func JobMatch(query []string, job []string) bool

func MarshalStream

func MarshalStream(inPipe gdbi.InPipe, nworkers int) chan []byte

func QueryChecksum

func QueryChecksum(query []*gripql.GraphStatement) (string, error)

func TraversalChecksum

func TraversalChecksum(query []*gripql.GraphStatement) ([]string, error)

func UnmarshalStream

func UnmarshalStream(inPipe chan []byte, nworkers int) chan gdbi.Traveler

Types

type FSResults

type FSResults struct {
	BaseDir string
	// contains filtered or unexported fields
}

func NewFSJobStorage

func NewFSJobStorage(path string) *FSResults

func (*FSResults) Delete

func (fs *FSResults) Delete(graph, id string) error

func (*FSResults) List

func (fs *FSResults) List(graph string) (chan string, error)

func (*FSResults) Search

func (fs *FSResults) Search(graph string, Query []*gripql.GraphStatement) (chan *gripql.JobStatus, error)

func (*FSResults) Spool

func (fs *FSResults) Spool(graph string, stream *Stream) (string, error)

func (*FSResults) Status

func (fs *FSResults) Status(graph, id string) (*gripql.JobStatus, error)

func (*FSResults) Stream

func (fs *FSResults) Stream(ctx context.Context, graph, id string) (*Stream, error)

type Job

type Job struct {
	Status        gripql.JobStatus
	DataType      gdbi.DataType
	MarkTypes     map[string]gdbi.DataType
	StepChecksums []string
}

type JobStorage

type JobStorage interface {
	List(graph string) (chan string, error)
	Search(graph string, Query []*gripql.GraphStatement) (chan *gripql.JobStatus, error)
	Spool(graph string, stream *Stream) (string, error)
	Stream(ctx context.Context, graph, id string) (*Stream, error)
	Delete(graph, id string) error
	Status(graph, id string) (*gripql.JobStatus, error)
}

type Stream

type Stream struct {
	Pipe      gdbi.InPipe
	DataType  gdbi.DataType
	MarkTypes map[string]gdbi.DataType
	Query     []*gripql.GraphStatement
}

Jump to

Keyboard shortcuts

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