rm

package
v0.8.1-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package rm provides an HTTP client for interacting with the Request Manager (RM) API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// CreateRequest takes parameters for a new request, creates the request,
	// and returns the request's id.
	CreateRequest(string, map[string]interface{}) (string, error)

	// GetRequest takes a request id and returns the corresponding request.
	GetRequest(string) (proto.Request, error)

	// StartRequest takes a request id and starts the corresponding request
	// (by sending it to the job runner).
	StartRequest(string) error

	// FinishRequest takes a request id and a state, and marks the
	// corresponding request as being finished with the provided state.
	FinishRequest(string, byte) error

	// StopRequest takes a request id and stops the corresponding request.
	// If the request is not running, it returns an error.
	StopRequest(string) error

	// SuspendRequest takes a request id and a SuspendedJobChain and suspends the
	// corresponding request. It marks the request's state as suspended and saves
	// the SuspendedJobChain.
	SuspendRequest(string, proto.SuspendedJobChain) error

	// RequestStatus gets the status of a request that corresponds to a
	// given request id.
	RequestStatus(string) (proto.RequestStatus, error)

	// GetJobChain gets the job chain for a given request id.
	GetJobChain(string) (proto.JobChain, error)

	// GetJL gets the job log of the given request ID.
	GetJL(string) ([]proto.JobLog, error)

	// CreateJL creates a JL for a given request id.
	CreateJL(string, proto.JobLog) error

	// RequestList returns a list of possible requests.
	RequestList() ([]proto.RequestSpec, error)

	// SysStatRunning returns a list of running jobs, sorted by runtime.
	SysStatRunning() (proto.RunningStatus, error)
}

A Client is an HTTP client used for interacting with the RM API.

func NewClient

func NewClient(c *http.Client, baseUrl string) Client

NewClient takes an http.Client and base API URL and creates a Client.

Directories

Path Synopsis
Package api provides controllers for each api endpoint.
Package api provides controllers for each api endpoint.
Package db provides database helper functions.
Package db provides database helper functions.
Package Grapher provides capabilities to construct directed acyclic graphs from configuration yaml files.
Package Grapher provides capabilities to construct directed acyclic graphs from configuration yaml files.
Package id provides an interface for generating ids.
Package id provides an interface for generating ids.
Package joblog provides an interface for reading and writing job logs.
Package joblog provides an interface for reading and writing job logs.
Package request provides an interface for managing requests.
Package request provides an interface for managing requests.
Package server bootstraps the Request Manager.
Package server bootstraps the Request Manager.
Package status provides system-wide status.
Package status provides system-wide status.
db

Jump to

Keyboard shortcuts

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