service

package
v0.0.0-...-3736fb9 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package service implements our gRPC service called Workflow.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Workflow

type Workflow struct {

	// Required for gRPC to run, makes sure we have all the methods defined.
	pb.UnimplementedWorkflowServer
	// contains filtered or unexported fields
}

Workflow implements our gRPC service.

func New

func New(storageDir string) (*Workflow, error)

New creates a new Workflow service.

func (*Workflow) Exec

func (w *Workflow) Exec(ctx context.Context, req *pb.ExecReq) (*pb.ExecResp, error)

Exec requests that the system execute a submitted workflow.

func (*Workflow) Status

func (w *Workflow) Status(ctx context.Context, req *pb.StatusReq) (*pb.StatusResp, error)

Status is used to query for the status of a workflow.

func (*Workflow) Submit

func (w *Workflow) Submit(ctx context.Context, req *pb.WorkReq) (*pb.WorkResp, error)

Submit submits a request to run a workflow.

Directories

Path Synopsis
Package executor provides the Work type which is used to execute a pb.WorkReq.
Package executor provides the Work type which is used to execute a pb.WorkReq.
Package jobs defines our Job type, which executes work and a registration system for registering Jobs.
Package jobs defines our Job type, which executes work and a registration system for registering Jobs.
register/diskerase
Package diskerase registers a job that can be used to erase a disk on a machine.
Package diskerase registers a job that can be used to erase a disk on a machine.
register/sleep
Package validatedecom registers a job that is used to validate a site is set to state "decom".
Package validatedecom registers a job that is used to validate a site is set to state "decom".
register/tokenbucket
Package tokenbucket registers a job that is used to fetch a token from a token bucket.
Package tokenbucket registers a job that is used to fetch a token from a token bucket.
register/validatedecom
Package validatedecom registers a job that is used to validate a site is set to state "decom".
Package validatedecom registers a job that is used to validate a site is set to state "decom".

Jump to

Keyboard shortcuts

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