api

package
v0.20.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package api provides the handlers for the Vela API.

Usage:

import "github.com/go-vela/worker/api"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelBuild added in v0.5.1

func CancelBuild(c *gin.Context)

CancelBuild represents the API handler to cancel a build currently running on an executor.

This function performs a hard cancellation of a build on worker. Any build running during this time will immediately be stopped.

func GetBuild added in v0.2.0

func GetBuild(c *gin.Context)

GetBuild represents the API handler to capture the build currently running on an executor.

func GetExecutor added in v0.2.0

func GetExecutor(c *gin.Context)

GetExecutor represents the API handler to capture the executor currently running on a worker.

func GetExecutors added in v0.2.0

func GetExecutors(c *gin.Context)

GetExecutors represents the API handler to capture the executors currently running on a worker.

func GetPipeline added in v0.2.0

func GetPipeline(c *gin.Context)

GetPipeline represents the API handler to capture the pipeline currently running on an executor.

func GetRepo added in v0.2.0

func GetRepo(c *gin.Context)

GetRepo represents the API handler to capture the repo currently running on an executor.

func Health

func Health(c *gin.Context)

Health check the status of the application.

func Metrics

func Metrics() http.Handler

Metrics returns a Prometheus handler for serving go metrics.

func Register added in v0.19.0

func Register(c *gin.Context)

Register will pass the token given in the request header to the register token channel of the worker. This will unblock operation if the worker has not been registered and the provided registration token is valid.

func Shutdown added in v0.2.0

func Shutdown(c *gin.Context)

Shutdown represents the API handler to shutdown a executors currently running on an worker.

This function performs a soft shut down of a worker. Any build running during this time will safely complete, then the worker will safely shut itself down.

func Version added in v0.7.0

func Version(c *gin.Context)

Version represents the API handler to report the version information for Vela.

Types

This section is empty.

Jump to

Keyboard shortcuts

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