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 ¶
FakeHandler returns an http.Handler that is capable of handling Vela API requests and returning mock responses.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.