Documentation ¶
Index ¶
- type AgentJobHistory
- type AgentJobHistoryCache
- type CCTray
- type CCTrayCache
- type CCTrayProject
- type Config
- type JobHistory
- type MockClient
- func (c *MockClient) AgentRunJobHistory(uuid string, offset int, pageSize int) (*gocd.AgentJobRunHistory, error)
- func (c *MockClient) DeleteAgent(uuid string) error
- func (c *MockClient) DisableAgent(uuid string) error
- func (c *MockClient) EnableAgent(uuid string) error
- func (c *MockClient) GetAgent(uuid string) (*gocd.Agent, error)
- func (c *MockClient) GetAllAgents() ([]*gocd.Agent, error)
- func (c *MockClient) GetAllEnvironmentConfigs() ([]*gocd.EnvironmentConfig, error)
- func (c *MockClient) GetEnvironmentConfig(name string) (*gocd.EnvironmentConfig, error)
- func (c *MockClient) GetJobHistory(pipeline, stage, job string) ([]*gocd.JobHistory, error)
- func (c *MockClient) GetPipelineGroups() ([]*gocd.PipelineGroup, error)
- func (c *MockClient) GetPipelineHistoryPage(string, int) (*gocd.PipelineHistoryPage, error)
- func (c *MockClient) GetPipelineInstance(string, int) (*gocd.PipelineInstance, error)
- func (c *MockClient) GetPipelineStatus(string) (*gocd.PipelineStatus, error)
- func (c *MockClient) GetScheduledJobs() ([]*gocd.ScheduledJob, error)
- func (c *MockClient) GetServerHealthMessages() ([]*gocd.ServerHealthMessage, error)
- func (c *MockClient) PausePipeline(string, string) (*gocd.SimpleMessage, error)
- func (c *MockClient) UnlockPipeline(string) (*gocd.SimpleMessage, error)
- func (c *MockClient) UnpausePipeline(string) (*gocd.SimpleMessage, error)
- func (c *MockClient) UpdateAgent(uuid string, agent *gocd.Agent) (*gocd.Agent, error)
- type PipelineGroups
- type Scraper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentJobHistory ¶ added in v0.8.0
type AgentJobHistory struct {
AgentJobHistory map[string][]*JobHistory
}
func (*AgentJobHistory) Add ¶ added in v0.8.0
func (a *AgentJobHistory) Add(agent string, jobHistory *JobHistory)
func (*AgentJobHistory) GetJobHistory ¶ added in v0.8.0
func (a *AgentJobHistory) GetJobHistory(client gocd.Client, agents []*gocd.Agent, cache AgentJobHistoryCache) error
type AgentJobHistoryCache ¶ added in v0.7.0
type CCTray ¶
type CCTray struct {
Projects []CCTrayProject `xml:"Project"`
}
func ParseCCTray ¶
ParseCCTray expects the cctray.xml contents as input.
type CCTrayCache ¶
type CCTrayCache struct {
// contains filtered or unexported fields
}
CCTrayCache keeps a cache of CCTray.
func NewCCTrayCache ¶
func NewCCTrayCache(url, user, pass string) *CCTrayCache
type CCTrayProject ¶
type CCTrayProject struct { Name string `xml:"name,attr"` Activity string `xml:"activity,attr"` LastResult string `xml:"lastBuildStatus,attr"` URL string `xml:"webUrl,attr"` // contains filtered or unexported fields }
func (CCTrayProject) Instance ¶
func (p CCTrayProject) Instance() int64
Instance number parsed from webURL attribute. Returns -1 on errors.
func (CCTrayProject) Job ¶ added in v0.7.0
func (p CCTrayProject) Job() string
Job extracted from name attribute
func (CCTrayProject) Pipeline ¶
func (p CCTrayProject) Pipeline() string
Pipeline extracted from name attribute.
func (CCTrayProject) Stage ¶
func (p CCTrayProject) Stage() string
Stage extracted from name attribute.
type Config ¶
type Config struct { Namespace string Registerer prometheus.Registerer GocdURL string GocdUser string GocdPass string }
Config for the Scraper.
type JobHistory ¶ added in v1.1.1
type JobHistory struct {
*gocd.AgentJobHistory
}
func (*JobHistory) GetOrderedStateTransitions ¶ added in v1.1.1
func (j *JobHistory) GetOrderedStateTransitions() []gocd.AgentJobStateTransition
type MockClient ¶ added in v0.7.0
type MockClient struct {
// contains filtered or unexported fields
}
func NewMockClient ¶ added in v1.1.0
func NewMockClient() *MockClient
func (*MockClient) AgentRunJobHistory ¶ added in v0.7.0
func (c *MockClient) AgentRunJobHistory(uuid string, offset int, pageSize int) (*gocd.AgentJobRunHistory, error)
func (*MockClient) DeleteAgent ¶ added in v0.7.0
func (c *MockClient) DeleteAgent(uuid string) error
func (*MockClient) DisableAgent ¶ added in v0.7.0
func (c *MockClient) DisableAgent(uuid string) error
func (*MockClient) EnableAgent ¶ added in v0.7.0
func (c *MockClient) EnableAgent(uuid string) error
func (*MockClient) GetAgent ¶ added in v0.7.0
func (c *MockClient) GetAgent(uuid string) (*gocd.Agent, error)
func (*MockClient) GetAllAgents ¶ added in v0.7.0
func (c *MockClient) GetAllAgents() ([]*gocd.Agent, error)
func (*MockClient) GetAllEnvironmentConfigs ¶ added in v0.7.0
func (c *MockClient) GetAllEnvironmentConfigs() ([]*gocd.EnvironmentConfig, error)
func (*MockClient) GetEnvironmentConfig ¶ added in v0.7.0
func (c *MockClient) GetEnvironmentConfig(name string) (*gocd.EnvironmentConfig, error)
func (*MockClient) GetJobHistory ¶ added in v0.7.0
func (c *MockClient) GetJobHistory(pipeline, stage, job string) ([]*gocd.JobHistory, error)
func (*MockClient) GetPipelineGroups ¶ added in v0.7.0
func (c *MockClient) GetPipelineGroups() ([]*gocd.PipelineGroup, error)
func (*MockClient) GetPipelineHistoryPage ¶ added in v0.7.0
func (c *MockClient) GetPipelineHistoryPage(string, int) (*gocd.PipelineHistoryPage, error)
func (*MockClient) GetPipelineInstance ¶ added in v0.7.0
func (c *MockClient) GetPipelineInstance(string, int) (*gocd.PipelineInstance, error)
func (*MockClient) GetPipelineStatus ¶ added in v0.7.0
func (c *MockClient) GetPipelineStatus(string) (*gocd.PipelineStatus, error)
func (*MockClient) GetScheduledJobs ¶ added in v0.7.0
func (c *MockClient) GetScheduledJobs() ([]*gocd.ScheduledJob, error)
func (*MockClient) GetServerHealthMessages ¶ added in v1.2.0
func (c *MockClient) GetServerHealthMessages() ([]*gocd.ServerHealthMessage, error)
func (*MockClient) PausePipeline ¶ added in v0.7.0
func (c *MockClient) PausePipeline(string, string) (*gocd.SimpleMessage, error)
func (*MockClient) UnlockPipeline ¶ added in v0.7.0
func (c *MockClient) UnlockPipeline(string) (*gocd.SimpleMessage, error)
func (*MockClient) UnpausePipeline ¶ added in v0.7.0
func (c *MockClient) UnpausePipeline(string) (*gocd.SimpleMessage, error)
func (*MockClient) UpdateAgent ¶ added in v0.7.0
func (c *MockClient) UpdateAgent(uuid string, agent *gocd.Agent) (*gocd.Agent, error)
type PipelineGroups ¶ added in v1.1.0
type PipelineGroups struct {
// contains filtered or unexported fields
}
func (*PipelineGroups) GetPipelineGroup ¶ added in v1.1.0
func (pg *PipelineGroups) GetPipelineGroup(client gocd.Client, pipeline string) (string, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.