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]bool
- func (p *AsyncProjectCommandOutputHandler) GetProjectOutputBuffer(jobID string) OutputBuffer
- 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 models.ProjectCommandContext, msg string, operationComplete bool)
- type JobInfo
- type JobURLSetter
- type NoopProjectOutputHandler
- func (p *NoopProjectOutputHandler) CleanUp(pullInfo PullInfo)
- func (p *NoopProjectOutputHandler) Deregister(jobID string, receiver chan string)
- func (p *NoopProjectOutputHandler) Handle()
- func (p *NoopProjectOutputHandler) IsKeyExists(key string) bool
- func (p *NoopProjectOutputHandler) Register(jobID string, receiver chan string)
- func (p *NoopProjectOutputHandler) Send(ctx models.ProjectCommandContext, msg string, isOperationComplete bool)
- type OutputBuffer
- type ProjectCmdOutputLine
- type ProjectCommandOutputHandler
- type ProjectJobURLGenerator
- type ProjectStatusUpdater
- type PullInfo
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]bool
func (*AsyncProjectCommandOutputHandler) GetProjectOutputBuffer ¶
func (p *AsyncProjectCommandOutputHandler) GetProjectOutputBuffer(jobID string) OutputBuffer
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 models.ProjectCommandContext, 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 models.ProjectCommandContext, cmdName models.CommandName, status models.CommitStatus) error
type NoopProjectOutputHandler ¶
type NoopProjectOutputHandler struct{}
NoopProjectOutputHandler is a mock that doesn't do anything
func (*NoopProjectOutputHandler) CleanUp ¶
func (p *NoopProjectOutputHandler) CleanUp(pullInfo PullInfo)
func (*NoopProjectOutputHandler) Deregister ¶
func (p *NoopProjectOutputHandler) Deregister(jobID string, receiver chan string)
func (*NoopProjectOutputHandler) Handle ¶
func (p *NoopProjectOutputHandler) Handle()
func (*NoopProjectOutputHandler) IsKeyExists ¶
func (p *NoopProjectOutputHandler) IsKeyExists(key string) bool
func (*NoopProjectOutputHandler) Register ¶
func (p *NoopProjectOutputHandler) Register(jobID string, receiver chan string)
func (*NoopProjectOutputHandler) Send ¶
func (p *NoopProjectOutputHandler) Send(ctx models.ProjectCommandContext, msg string, isOperationComplete 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 models.ProjectCommandContext, 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) }
func NewAsyncProjectCommandOutputHandler ¶
func NewAsyncProjectCommandOutputHandler( projectCmdOutput chan *ProjectCmdOutputLine, logger logging.SimpleLogging, ) ProjectCommandOutputHandler
type ProjectJobURLGenerator ¶
type ProjectJobURLGenerator interface {
GenerateProjectJobURL(p models.ProjectCommandContext) (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 models.ProjectCommandContext, cmdName models.CommandName, status models.CommitStatus, url string) error }
Click to show internal directories.
Click to hide internal directories.