Documentation
¶
Index ¶
- type Client
- type RegisterRequest
- type RegisterResponse
- type Runner
- func (r *Runner) IsAlreadyInProgress() bool
- func (r *Runner) IsMaster() bool
- func (r *Runner) IsRunning() bool
- func (r *Runner) SendInProgressTestResult(projectID, externalID, statusCode, statusType, startedOn string) bool
- func (r *Runner) SetAlreadyInProgress(v bool)
- func (r *Runner) SetTestRunID(id string)
- func (r *Runner) SetWorkerStatus(status string)
- func (r *Runner) Start() bool
- func (r *Runner) TestRunID() string
- type SetWorkerStatusRequest
- type TestResultCutModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a simple HTTP client for the Sync Storage service.
func (*Client) HealthCheck ¶
HealthCheck checks if the sync storage service is running.
func (*Client) Register ¶
func (c *Client) Register(req RegisterRequest) (*RegisterResponse, error)
Register registers a worker with the sync storage service.
func (*Client) SendInProgressTestResult ¶
func (c *Client) SendInProgressTestResult(testRunID string, model TestResultCutModel) error
SendInProgressTestResult sends an in-progress test result to sync storage.
func (*Client) SetWorkerStatus ¶
func (c *Client) SetWorkerStatus(req SetWorkerStatusRequest) error
SetWorkerStatus sets the status of a worker.
type RegisterRequest ¶
RegisterRequest represents a worker registration request.
type RegisterResponse ¶
type RegisterResponse struct {
IsMaster bool `json:"is_master"`
}
RegisterResponse represents a worker registration response.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner manages the lifecycle of the Sync Storage process and worker coordination.
func (*Runner) IsAlreadyInProgress ¶
IsAlreadyInProgress returns the in-progress flag state.
func (*Runner) SendInProgressTestResult ¶
func (r *Runner) SendInProgressTestResult(projectID, externalID, statusCode, statusType, startedOn string) bool
SendInProgressTestResult sends test result to sync storage if this worker is master.
func (*Runner) SetAlreadyInProgress ¶
SetAlreadyInProgress sets the in-progress flag.
func (*Runner) SetTestRunID ¶
SetTestRunID updates the test run ID.
func (*Runner) SetWorkerStatus ¶
SetWorkerStatus sets the worker status.
type SetWorkerStatusRequest ¶
type SetWorkerStatusRequest struct {
PID string `json:"pid"`
Status string `json:"status"`
TestRunID string `json:"testRunId"`
}
SetWorkerStatusRequest represents a request to set worker status.
type TestResultCutModel ¶
type TestResultCutModel struct {
ProjectID string `json:"projectId"`
AutoTestExternalID string `json:"autoTestExternalId"`
StatusCode string `json:"statusCode"`
StatusType string `json:"statusType"`
StartedOn string `json:"startedOn"`
}
TestResultCutModel represents a cut-down test result for sync storage.