server

package
v0.0.0-...-a8b8e24 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implementation for jobs

func New

func New(db *pgdb.DB, connFactory *secureconn.Factory, eventsClient automate_event.EventServiceClient,
	managerEndpoint string, cerealManager *cereal.Manager, fireJailExecProfilePath string) *Server

New creates a new jobs server

func (*Server) Create

func (srv *Server) Create(ctx context.Context, in *jobs.Job) (*jobs.Id, error)

Create creates a new job

func (*Server) Delete

func (srv *Server) Delete(ctx context.Context, in *jobs.Id) (*pb.Empty, error)

Delete a job

func (*Server) GetJobResultByNodeId

func (srv *Server) GetJobResultByNodeId(ctx context.Context, in *jobs.GetJobResultByNodeIdRequest) (*jobs.ResultsRow, error)

GetJobResultByNodeId returns the results row for a given job id and node id

func (*Server) List

func (srv *Server) List(ctx context.Context, in *jobs.Query) (*jobs.Jobs, error)

List jobs based on a query

func (*Server) ListInitiatedScans

func (srv *Server) ListInitiatedScans(ctx context.Context, in *jobs.TimeQuery) (*jobs.Ids, error)

ListInitiatedScans returns a list of ids for all scans with an end_time after or equal to the time provided or status 'running'. This is used for scan jobs auditing purposes.

func (*Server) Read

func (srv *Server) Read(ctx context.Context, in *jobs.Id) (*jobs.Job, error)

Read a job via ID

func (*Server) Rerun

func (srv *Server) Rerun(ctx context.Context, in *jobs.Id) (*jobs.RerunResponse, error)

Rerun a job. Does not create a new job in database. Reads the job info from db given the job id, and sends that information over to the scheduler

func (*Server) Update

func (srv *Server) Update(ctx context.Context, in *jobs.Job) (*pb.Empty, error)

Update one job

Jump to

Keyboard shortcuts

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