fake_agent_utils

package
v0.0.0-...-b74f83a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const HttpRequestTimeout = 1 * time.Second

Variables

This section is empty.

Functions

func AssignJob

func AssignJob(organizationUrl string, agentName string, jobId int, httpClient *http.Client) error

func CopyFileIfNotExists

func CopyFileIfNotExists(absoluteSource, relativeDest string) error

func CopyWorkerProcessBinary

func CopyWorkerProcessBinary() error

func DeleteAgent

func DeleteAgent(organizationUrl string, agentId int, poolId int64, httpClient *http.Client) error

func DoesFakeAgentCapabilitiesSatisfyDemands

func DoesFakeAgentCapabilitiesSatisfyDemands(demands []string) bool

func FinishJob

func FinishJob(organizationUrl string, agentName string, jobId int, httpClient *http.Client) error

func GetEligibleJobsSortedByStartDelay

func GetEligibleJobsSortedByStartDelay(jobs []fake_platform_server.Job) []fake_platform_server.Job

func GetPendingJobs

func GetPendingJobs(organizationUrl string, poolId int64, httpClient *http.Client) ([]fake_platform_server.Job, error)

GetPendingJobs returns all pending or in-progress jobs for the given pool ID

func GetPoolIdFromName

func GetPoolIdFromName(organizationUrl, poolName string, httpClient *http.Client) (int64, error)

func RegisterAsAgent

func RegisterAsAgent(organizationUrl string, poolId int64, agentName string, httpClient *http.Client) (int, error)

func StartWorkerProcess

func StartWorkerProcess() (*os.Process, error)

Types

type AddAgentResponse

type AddAgentResponse struct {
	Id int `json:"id"`
}

type ConflictError

type ConflictError struct {
}

func (*ConflictError) Error

func (e *ConflictError) Error() string

Jump to

Keyboard shortcuts

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