worker

package
v0.25.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package worker provides a mock for using the Worker API.

Usage:

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

Index

Constants

View Source
const (
	// ExecutorResp represents a JSON return for a single worker.
	ExecutorResp = `
		{
			"id": 1,
			"host": "worker_1",
			"runtime": "docker",
			"distribution": "linux",
			"build": ` + BuildResp + `,
			"pipeline": ` + PipelineResp + `,
			"repo": ` + RepoResp + `
		}`

	// ExecutorsResp represents a JSON return for one to many workers.
	ExecutorsResp = `[ ` + ExecutorResp + `,` + ExecutorResp + `]`
)
View Source
const (
	BuildResp = `` /* 1796-byte string literal not displayed */

)
View Source
const (
	// PipelineResp represents a JSON return for a single pipeline.
	PipelineResp = `` /* 454-byte string literal not displayed */

)
View Source
const (
	// RepoResp represents a JSON return for a single repo.
	RepoResp = `` /* 428-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func FakeHandler

func FakeHandler() http.Handler

FakeHandler returns an http.Handler that is capable of handling Vela API requests and returning mock responses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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