api

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API contains routing and messagign capabilities. Valid HTTP requests to api.API are routed via rabbitmq to either kick off or report upon workflows.

func NewAPI

func NewAPI(ampqURI, redisURI, host string, port int) (a API, err error)

NewAPI receives an ampquri for routing messages, a redisURI for configuring workflows, and a host and a port for listening on.

func (API) Start

func (a API) Start()

Start starts a listener on API.listener Used for routing metadata, monitoring, and workflow requests.

type ErrorResponse

type ErrorResponse struct {
	Message string
}

ErrorResponse is a placeholder for outgoing errors in responses

type Mon

type Mon struct {
	// Job node's hostname
	Hostname            string
	EUID, GID, PID, UID int
	UTF8                string
}

Mon is a container of Monitoring/ Metadata for json marshaling

func NewMon

func NewMon() (m Mon)

NewMon initialises and returns a `Mon`, containing monitoring and metadata

type StartWorkflow

type StartWorkflow struct {
	InitWorkflow StarterRequest
	Time         time.Time
	UUID         string
}

StartWorkflow contains the message structure that kicking off a workflow expects in a master TaskManager

type StarterRequest

type StarterRequest struct {
	Name      string
	Variables map[string]interface{}
}

StarterRequest is a placeholder for incoming 'start workflow' requests

type StarterResponse

type StarterResponse struct {
	UUID string
}

StarterResponse is a placeholder for outgoing 'start workflow' responses

Jump to

Keyboard shortcuts

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