Documentation ¶
Index ¶
- Constants
- func SendMessage(conn *websocket.Conn, msg *Message) error
- type AgentBuildingInfo
- type AgentIdentifier
- type AgentRuntimeInfo
- type Build
- type BuildCommand
- func AndCommand(commands ...*BuildCommand) *BuildCommand
- func CleandirCommand(path string, allows ...string) *BuildCommand
- func ComposeCommand(commands ...*BuildCommand) *BuildCommand
- func CondCommand(commands ...*BuildCommand) *BuildCommand
- func DownloadCommand(file_or_dir, src, url, dest, checksumUrl, checksumPath string) *BuildCommand
- func DownloadDirCommand(src, url, dest, checksumUrl, checksumPath string) *BuildCommand
- func DownloadFileCommand(src, url, dest, checksumUrl, checksumPath string) *BuildCommand
- func EchoCommand(line string) *BuildCommand
- func ExecCommand(args ...string) *BuildCommand
- func ExportCommand(kvs ...string) *BuildCommand
- func FailCommand(msg string) *BuildCommand
- func GenerateTestReportCommand(args ...string) *BuildCommand
- func MkdirsCommand(path string) *BuildCommand
- func NewBuildCommand(name string) *BuildCommand
- func OrCommand(commands ...*BuildCommand) *BuildCommand
- func ReportCompletingCommand() *BuildCommand
- func ReportCurrentStatusCommand(jobState string) *BuildCommand
- func SecretCommand(vs ...string) *BuildCommand
- func TestCommand(args ...string) *BuildCommand
- func UploadArtifactCommand(src, dest, ignoreUnmatchError string) *BuildCommand
- func (cmd *BuildCommand) AddArg(name, value string) *BuildCommand
- func (cmd *BuildCommand) AddCommands(commands ...*BuildCommand) *BuildCommand
- func (cmd *BuildCommand) AddListArg(name string, list []string) *BuildCommand
- func (cmd *BuildCommand) ListArg(name string) (list []string, err error)
- func (cmd *BuildCommand) RunIf(c string) *BuildCommand
- func (cmd *BuildCommand) RunIfAny() bool
- func (cmd *BuildCommand) RunIfMatch(buildStatus string) bool
- func (cmd *BuildCommand) SetArgs(args map[string]string) *BuildCommand
- func (cmd *BuildCommand) SetExecInput(input string) *BuildCommand
- func (cmd *BuildCommand) SetOnCancel(c *BuildCommand) *BuildCommand
- func (cmd *BuildCommand) SetTest(test *BuildCommand) *BuildCommand
- func (cmd *BuildCommand) Setwd(wd string) *BuildCommand
- type Message
- func AckMessage(ackId string) *Message
- func BuildMessage(cmd *Build) *Message
- func CancelMessage() *Message
- func CompletedMessage(report *Report) *Message
- func PingMessage(data *AgentRuntimeInfo) *Message
- func ReceiveMessage(conn *websocket.Conn) (*Message, error)
- func ReportMessage(t string, report *Report) *Message
- func ReregisterMessage() *Message
- func SetCookieMessage(cookie string) *Message
- type Registration
- type Report
Constants ¶
View Source
const ( BuildPassed = "Passed" BuildFailed = "Failed" BuildCanceled = "Cancelled" )
View Source
const ( TestReportFileName = "index.html" RunIfConfigAny = "any" RunIfConfigPassed = "passed" ExecInput = "" CommandCompose = "compose" CommandCond = "cond" CommandAnd = "and" CommandOr = "or" CommandExport = "export" CommandTest = "test" CommandExec = "exec" CommandEcho = "echo" CommandUploadArtifact = "uploadArtifact" CommandReportCurrentStatus = "reportCurrentStatus" CommandReportCompleting = "reportCompleting" CommandMkdirs = "mkdirs" CommandCleandir = "cleandir" CommandFail = "fail" CommandSecret = "secret" CommandDownloadFile = "downloadFile" CommandDownloadDir = "downloadDir" CommandGenerateTestReport = "generateTestReport" CommandGenerateProperty = "generateProperty" )
View Source
const ( SetCookieAction = "setCookie" CancelBuildAction = "cancelBuild" ReregisterAction = "reregister" BuildAction = "build" PingAction = "ping" AckAction = "acknowledge" ReportCurrentStatusAction = "reportCurrentStatus" ReportCompletingAction = "reportCompleting" ReportCompletedAction = "reportCompleted" AssignWorkAction = "assignWork" ConsoleOutActon = "consoleOut" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentBuildingInfo ¶
type AgentIdentifier ¶
type AgentRuntimeInfo ¶
type AgentRuntimeInfo struct { Identifier *AgentIdentifier `json:"identifier"` BuildingInfo *AgentBuildingInfo `json:"buildingInfo"` RuntimeStatus string `json:"runtimeStatus"` Location string `json:"location"` UsableSpace int64 `json:"usableSpace"` OperatingSystemName string `json:"operatingSystemName"` Cookie string `json:"cookie"` AgentLauncherVersion string `json:"agentLauncherVersion"` ElasticPluginId string `json:"elasticPluginId"` ElasticAgentId string `json:"elasticAgentId"` SupportsBuildCommandProtocol bool `json:"supportsBuildCommandProtocol"` }
type Build ¶
type Build struct { BuildId string BuildLocator string BuildLocatorForDisplay string ConsoleUrl string ArtifactUploadBaseUrl string PropertyBaseUrl string BuildCommand *BuildCommand }
func NewBuild ¶
func NewBuild(id, locator, locatorForDisplay, consoleUrl, artifactUploadBaseUrl, propertyBaseUrl string, commands ...*BuildCommand) *Build
type BuildCommand ¶
type BuildCommand struct { Name string Args map[string]string RunIfConfig string ExecInput string SubCommands []*BuildCommand WorkingDirectory string Test *BuildCommand OnCancel *BuildCommand }
func AndCommand ¶
func AndCommand(commands ...*BuildCommand) *BuildCommand
func CleandirCommand ¶
func CleandirCommand(path string, allows ...string) *BuildCommand
func ComposeCommand ¶
func ComposeCommand(commands ...*BuildCommand) *BuildCommand
func CondCommand ¶
func CondCommand(commands ...*BuildCommand) *BuildCommand
func DownloadCommand ¶
func DownloadCommand(file_or_dir, src, url, dest, checksumUrl, checksumPath string) *BuildCommand
func DownloadDirCommand ¶
func DownloadDirCommand(src, url, dest, checksumUrl, checksumPath string) *BuildCommand
func DownloadFileCommand ¶
func DownloadFileCommand(src, url, dest, checksumUrl, checksumPath string) *BuildCommand
func EchoCommand ¶
func EchoCommand(line string) *BuildCommand
func ExecCommand ¶
func ExecCommand(args ...string) *BuildCommand
func ExportCommand ¶
func ExportCommand(kvs ...string) *BuildCommand
func FailCommand ¶
func FailCommand(msg string) *BuildCommand
func GenerateTestReportCommand ¶
func GenerateTestReportCommand(args ...string) *BuildCommand
func MkdirsCommand ¶
func MkdirsCommand(path string) *BuildCommand
func NewBuildCommand ¶
func NewBuildCommand(name string) *BuildCommand
func OrCommand ¶
func OrCommand(commands ...*BuildCommand) *BuildCommand
func ReportCompletingCommand ¶
func ReportCompletingCommand() *BuildCommand
func ReportCurrentStatusCommand ¶
func ReportCurrentStatusCommand(jobState string) *BuildCommand
func SecretCommand ¶
func SecretCommand(vs ...string) *BuildCommand
func TestCommand ¶
func TestCommand(args ...string) *BuildCommand
func UploadArtifactCommand ¶
func UploadArtifactCommand(src, dest, ignoreUnmatchError string) *BuildCommand
func (*BuildCommand) AddArg ¶
func (cmd *BuildCommand) AddArg(name, value string) *BuildCommand
func (*BuildCommand) AddCommands ¶
func (cmd *BuildCommand) AddCommands(commands ...*BuildCommand) *BuildCommand
func (*BuildCommand) AddListArg ¶
func (cmd *BuildCommand) AddListArg(name string, list []string) *BuildCommand
func (*BuildCommand) ListArg ¶
func (cmd *BuildCommand) ListArg(name string) (list []string, err error)
func (*BuildCommand) RunIf ¶
func (cmd *BuildCommand) RunIf(c string) *BuildCommand
func (*BuildCommand) RunIfAny ¶
func (cmd *BuildCommand) RunIfAny() bool
func (*BuildCommand) RunIfMatch ¶
func (cmd *BuildCommand) RunIfMatch(buildStatus string) bool
func (*BuildCommand) SetArgs ¶
func (cmd *BuildCommand) SetArgs(args map[string]string) *BuildCommand
func (*BuildCommand) SetExecInput ¶
func (cmd *BuildCommand) SetExecInput(input string) *BuildCommand
func (*BuildCommand) SetOnCancel ¶
func (cmd *BuildCommand) SetOnCancel(c *BuildCommand) *BuildCommand
func (*BuildCommand) SetTest ¶
func (cmd *BuildCommand) SetTest(test *BuildCommand) *BuildCommand
func (*BuildCommand) Setwd ¶
func (cmd *BuildCommand) Setwd(wd string) *BuildCommand
type Message ¶
type Message struct { Action string `json:"action"` Data string `json:"data"` AcknowledgeId string `json:"acknowledgementId"` }
func AckMessage ¶
func BuildMessage ¶
func CancelMessage ¶
func CancelMessage() *Message
func CompletedMessage ¶
func PingMessage ¶
func PingMessage(data *AgentRuntimeInfo) *Message
func ReportMessage ¶
func ReregisterMessage ¶
func ReregisterMessage() *Message
func SetCookieMessage ¶
func (*Message) AgentRuntimeInfo ¶
func (m *Message) AgentRuntimeInfo() *AgentRuntimeInfo
func (*Message) DataString ¶
type Registration ¶
type Registration struct {
AgentPrivateKey, AgentCertificate string
}
Click to show internal directories.
Click to hide internal directories.