Documentation ¶
Index ¶
- func GetDefaultAgentWorkDir() string
- func GetPayloadForCreateAgent(name string) *strings.Reader
- func PrepareForComputerAgent(roundTripper *mhttp.MockRoundTripper, ...)
- func PrepareForComputerAgentSecretRequest(roundTripper *mhttp.MockRoundTripper, ...)
- func PrepareForComputerCreateRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string)
- func PrepareForComputerDeleteRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string)
- func PrepareForComputerList() string
- func PrepareForComputerListRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password string)
- func PrepareForComputerLogRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string)
- func PrepareForComputerLogRequestWithCode(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string, ...)
- func PrepareForLaunchComputer(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string)
- type Client
- func (c *Client) Create(name string) (err error)
- func (c *Client) Delete(name string) (err error)
- func (c *Client) GetLog(name string) (log string, err error)
- func (c *Client) GetSecret(name string) (secret string, err error)
- func (c *Client) Launch(name string) (err error)
- func (c *Client) List() (computers List, err error)
- type Computer
- type Label
- type List
- type OfflineCause
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultAgentWorkDir ¶
func GetDefaultAgentWorkDir() string
GetDefaultAgentWorkDir returns the Jenkins agent work dir
func GetPayloadForCreateAgent ¶
GetPayloadForCreateAgent returns a payload for creating an agent
func PrepareForComputerAgent ¶
func PrepareForComputerAgent(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name, secret string)
PrepareForComputerAgent only for test
func PrepareForComputerAgentSecretRequest ¶
func PrepareForComputerAgentSecretRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name, secret string)
PrepareForComputerAgentSecretRequest only for test
func PrepareForComputerCreateRequest ¶
func PrepareForComputerCreateRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string)
PrepareForComputerCreateRequest only for test
func PrepareForComputerDeleteRequest ¶
func PrepareForComputerDeleteRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string)
PrepareForComputerDeleteRequest only for test
func PrepareForComputerList ¶
func PrepareForComputerList() string
PrepareForComputerList only for test
func PrepareForComputerListRequest ¶
func PrepareForComputerListRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password string)
PrepareForComputerListRequest only for test
func PrepareForComputerLogRequest ¶
func PrepareForComputerLogRequest(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string)
PrepareForComputerLogRequest only for test
func PrepareForComputerLogRequestWithCode ¶
func PrepareForComputerLogRequestWithCode(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string, statusCode int)
PrepareForComputerLogRequestWithCode only for test
func PrepareForLaunchComputer ¶
func PrepareForLaunchComputer(roundTripper *mhttp.MockRoundTripper, rootURL, user, password, name string)
PrepareForLaunchComputer only for test
Types ¶
type Client ¶
type Client struct {
core.JenkinsCore
}
Client is client for operate computers
type Computer ¶
type Computer struct { AssignedLabels []Label Description string DisplayName string Idle bool JnlpAgent bool LaunchSupported bool ManualLaunchAllowed bool NumExecutors int Offline bool OfflineCause OfflineCause OfflineCauseReason string TemporarilyOffline bool }
Computer is the agent of Jenkins
type List ¶
type List struct { Computer []Computer TotalExecutors int // contains filtered or unexported fields }
List represents the list of computer from API
type OfflineCause ¶
OfflineCause is the cause of computer offline