Documentation ¶
Index ¶
- type AsyncProjectCommandOutputHandler
- func (p *AsyncProjectCommandOutputHandler) CleanUp(pullInfo PullInfo)
- func (p *AsyncProjectCommandOutputHandler) Deregister(jobID string, ch chan string)
- func (p *AsyncProjectCommandOutputHandler) GetJobIDMapForPull(pullInfo PullInfo) map[string]time.Time
- func (p *AsyncProjectCommandOutputHandler) GetProjectOutputBuffer(jobID string) OutputBuffer
- func (p *AsyncProjectCommandOutputHandler) GetPullToJobMapping() []PullInfoWithJobIDs
- func (p *AsyncProjectCommandOutputHandler) GetReceiverBufferForPull(jobID string) map[chan string]bool
- func (p *AsyncProjectCommandOutputHandler) Handle()
- func (p *AsyncProjectCommandOutputHandler) IsKeyExists(key string) bool
- func (p *AsyncProjectCommandOutputHandler) Register(jobID string, receiver chan string)
- func (p *AsyncProjectCommandOutputHandler) Send(ctx command.ProjectContext, msg string, operationComplete bool)
- func (p *AsyncProjectCommandOutputHandler) SendWorkflowHook(ctx models.WorkflowHookCommandContext, msg string, operationComplete bool)
- type JobIDInfo
- type JobInfo
- type JobURLSetter
- type NoopProjectOutputHandler
- func (p *NoopProjectOutputHandler) CleanUp(_ PullInfo)
- func (p *NoopProjectOutputHandler) Deregister(_ string, _ chan string)
- func (p *NoopProjectOutputHandler) GetPullToJobMapping() []PullInfoWithJobIDs
- func (p *NoopProjectOutputHandler) Handle()
- func (p *NoopProjectOutputHandler) IsKeyExists(_ string) bool
- func (p *NoopProjectOutputHandler) Register(_ string, _ chan string)
- func (p *NoopProjectOutputHandler) Send(_ command.ProjectContext, _ string, _ bool)
- func (p *NoopProjectOutputHandler) SendWorkflowHook(_ models.WorkflowHookCommandContext, _ string, _ bool)
- type OutputBuffer
- type ProjectCmdOutputLine
- type ProjectCommandOutputHandler
- type ProjectJobURLGenerator
- type ProjectStatusUpdater
- type PullInfo
- type PullInfoWithJobIDs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncProjectCommandOutputHandler ¶
type AsyncProjectCommandOutputHandler struct {
// contains filtered or unexported fields
}
AsyncProjectCommandOutputHandler is a handler to transport terraform client outputs to the front end.
func (*AsyncProjectCommandOutputHandler) CleanUp ¶
func (p *AsyncProjectCommandOutputHandler) CleanUp(pullInfo PullInfo)
func (*AsyncProjectCommandOutputHandler) Deregister ¶
func (p *AsyncProjectCommandOutputHandler) Deregister(jobID string, ch chan string)
Remove channel, so client no longer receives Terraform output
func (*AsyncProjectCommandOutputHandler) GetJobIDMapForPull ¶
func (p *AsyncProjectCommandOutputHandler) GetJobIDMapForPull(pullInfo PullInfo) map[string]time.Time
func (*AsyncProjectCommandOutputHandler) GetProjectOutputBuffer ¶
func (p *AsyncProjectCommandOutputHandler) GetProjectOutputBuffer(jobID string) OutputBuffer
func (*AsyncProjectCommandOutputHandler) GetPullToJobMapping ¶ added in v0.27.0
func (p *AsyncProjectCommandOutputHandler) GetPullToJobMapping() []PullInfoWithJobIDs
func (*AsyncProjectCommandOutputHandler) GetReceiverBufferForPull ¶
func (p *AsyncProjectCommandOutputHandler) GetReceiverBufferForPull(jobID string) map[chan string]bool
func (*AsyncProjectCommandOutputHandler) Handle ¶
func (p *AsyncProjectCommandOutputHandler) Handle()
func (*AsyncProjectCommandOutputHandler) IsKeyExists ¶
func (p *AsyncProjectCommandOutputHandler) IsKeyExists(key string) bool
func (*AsyncProjectCommandOutputHandler) Register ¶
func (p *AsyncProjectCommandOutputHandler) Register(jobID string, receiver chan string)
func (*AsyncProjectCommandOutputHandler) Send ¶
func (p *AsyncProjectCommandOutputHandler) Send(ctx command.ProjectContext, msg string, operationComplete bool)
func (*AsyncProjectCommandOutputHandler) SendWorkflowHook ¶ added in v0.22.0
func (p *AsyncProjectCommandOutputHandler) SendWorkflowHook(ctx models.WorkflowHookCommandContext, msg string, operationComplete bool)
type JobURLSetter ¶
type JobURLSetter struct {
// contains filtered or unexported fields
}
func NewJobURLSetter ¶
func NewJobURLSetter(projectJobURLGenerator ProjectJobURLGenerator, projectStatusUpdater ProjectStatusUpdater) *JobURLSetter
func (*JobURLSetter) SetJobURLWithStatus ¶
func (j *JobURLSetter) SetJobURLWithStatus(ctx command.ProjectContext, cmdName command.Name, status models.CommitStatus, result *command.ProjectResult) error
type NoopProjectOutputHandler ¶
type NoopProjectOutputHandler struct{}
NoopProjectOutputHandler is a mock that doesn't do anything
func (*NoopProjectOutputHandler) CleanUp ¶
func (p *NoopProjectOutputHandler) CleanUp(_ PullInfo)
func (*NoopProjectOutputHandler) Deregister ¶
func (p *NoopProjectOutputHandler) Deregister(_ string, _ chan string)
func (*NoopProjectOutputHandler) GetPullToJobMapping ¶ added in v0.27.0
func (p *NoopProjectOutputHandler) GetPullToJobMapping() []PullInfoWithJobIDs
func (*NoopProjectOutputHandler) Handle ¶
func (p *NoopProjectOutputHandler) Handle()
func (*NoopProjectOutputHandler) IsKeyExists ¶
func (p *NoopProjectOutputHandler) IsKeyExists(_ string) bool
func (*NoopProjectOutputHandler) Register ¶
func (p *NoopProjectOutputHandler) Register(_ string, _ chan string)
func (*NoopProjectOutputHandler) Send ¶
func (p *NoopProjectOutputHandler) Send(_ command.ProjectContext, _ string, _ bool)
func (*NoopProjectOutputHandler) SendWorkflowHook ¶ added in v0.22.0
func (p *NoopProjectOutputHandler) SendWorkflowHook(_ models.WorkflowHookCommandContext, _ string, _ bool)
type OutputBuffer ¶
type ProjectCmdOutputLine ¶
type ProjectCommandOutputHandler ¶
type ProjectCommandOutputHandler interface { // Send will enqueue the msg and wait for Handle() to receive the message. Send(ctx command.ProjectContext, msg string, operationComplete bool) SendWorkflowHook(ctx models.WorkflowHookCommandContext, msg string, operationComplete bool) // Register registers a channel and blocks until it is caught up. Callers should call this asynchronously when attempting // to read the channel in the same goroutine Register(jobID string, receiver chan string) // Deregister removes a channel from successive updates and closes it. Deregister(jobID string, receiver chan string) IsKeyExists(key string) bool // Listens for msg from channel Handle() // Cleans up resources for a pull CleanUp(pullInfo PullInfo) // Returns a map from Pull Requests to Jobs GetPullToJobMapping() []PullInfoWithJobIDs }
func NewAsyncProjectCommandOutputHandler ¶
func NewAsyncProjectCommandOutputHandler( projectCmdOutput chan *ProjectCmdOutputLine, logger logging.SimpleLogging, ) ProjectCommandOutputHandler
type ProjectJobURLGenerator ¶
type ProjectJobURLGenerator interface {
GenerateProjectJobURL(p command.ProjectContext) (string, error)
}
ProjectJobURLGenerator generates urls to view project's progress.
type ProjectStatusUpdater ¶
type ProjectStatusUpdater interface { // UpdateProject sets the commit status for the project represented by // ctx. UpdateProject(ctx command.ProjectContext, cmdName command.Name, status models.CommitStatus, url string, res *command.ProjectResult) error }
type PullInfoWithJobIDs ¶ added in v0.27.0
Click to show internal directories.
Click to hide internal directories.