httpapi

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package httpapi implements the shared endpoints that are implemented over the HTTP protocol rather than gRPC. This isn't the full API, only specific subsets for the purpose of helping the UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleExec

func HandleExec(addr string, tls bool) http.HandlerFunc

HandleExec handles the `waypoint exec` websocket API. This works by connecting back to our own local gRPC server.

func HandleTrigger added in v0.7.2

func HandleTrigger(addr string, tls bool) http.HandlerFunc

HandleTrigger will execute a run trigger, if the requested id exists This works by connecting back to our own local gRPC server.

Types

type Message added in v0.7.2

type Message struct {
	// The job id that was queued when running the requested trigger
	JobId string `json:"jobId,omitempty"`

	// Value is the job stream event message to stream back to the requester
	Value interface{} `json:"value,omitempty"`
	// ValueType is the kind of job stream event
	ValueType string `json:"valueType,omitempty"`

	// If the job has completed, we return a 0 for success, 1 for failure.
	ExitCode string `json:"exitCode,omitempty"`
	// Error is set when the job failures for any reason
	Error interface{} `json:"error,omitempty"`
}

Message is the message we return to the requester when streaming job output

Jump to

Keyboard shortcuts

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