Documentation ¶
Index ¶
- Constants
- func DispatchMessage(gs BaseGlobalState, message string, messageType string)
- func DispatchMessageNoSet(gs BaseGlobalState, message string, messageType string)
- func DispatchWorkerMessage(gs BaseGlobalState, workerId string, childJobId string, message string, ...)
- func HandleError(gs BaseGlobalState, err error)
- func HandleErrorNoSet(gs BaseGlobalState, err error)
- func HandleStringError(gs BaseGlobalState, errString string)
- func SetInBucket(bucket *gridfs.Bucket, filename string, data []byte, contentType string, ...) error
- func UpdateStatus(gs BaseGlobalState, status string)
- func UpdateStatusNoSet(gs BaseGlobalState, status string)
- type APITeamOptions
- type BaseGlobalState
- type BaseMetricsStore
- type ChildJob
- type ChildJobDistribution
- type CollectionContext
- type Distribution
- type EnvironmentContext
- type Job
- type LiveService
- type LocalhostFile
- type MarkMessage
- type MessageQueue
- type NamedConnection
- type OrchestratorMessage
- type OrchestratorOrWorkerMessage
- type RunAuthClient
- type Scope
- type WorkerConnections
- type WorkerMessage
- type WorkerState
Constants ¶
View Source
const DefaultName = "default"
View Source
const GlobalName = "global"
Variables ¶
This section is empty.
Functions ¶
func DispatchMessage ¶
func DispatchMessage(gs BaseGlobalState, message string, messageType string)
func DispatchMessageNoSet ¶
func DispatchMessageNoSet(gs BaseGlobalState, message string, messageType string)
func DispatchWorkerMessage ¶
func DispatchWorkerMessage(gs BaseGlobalState, workerId string, childJobId string, message string, messageType string)
func HandleError ¶
func HandleError(gs BaseGlobalState, err error)
func HandleErrorNoSet ¶
func HandleErrorNoSet(gs BaseGlobalState, err error)
func HandleStringError ¶
func HandleStringError(gs BaseGlobalState, errString string)
func SetInBucket ¶
func UpdateStatus ¶
func UpdateStatus(gs BaseGlobalState, status string)
func UpdateStatusNoSet ¶
func UpdateStatusNoSet(gs BaseGlobalState, status string)
Types ¶
type APITeamOptions ¶
type APITeamOptions struct {
Distribution `json:"distribution"`
}
type BaseGlobalState ¶
type BaseGlobalState interface { Ctx() context.Context Logger() *logrus.Logger OrchestratorClient() *redis.Client JobId() string OrchestratorId() string MetricsStore() *BaseMetricsStore GetStatus() string SetStatus(string) CreditsManager() *lib.CreditsManager Standalone() bool FuncAuthClient() RunAuthClient LoadZones() []string MessageQueue() *MessageQueue }
type BaseMetricsStore ¶
type BaseMetricsStore interface { InitMetricsStore(childJobs map[string]ChildJobDistribution) AddMessage(message WorkerMessage, workerLocation string, subFraction float64) error Cleanup() }
Cached metrics are stored before being collated and sent
type ChildJob ¶
type ChildJob struct { Job ChildJobId string `json:"childJobId"` Options libWorker.Options `json:"options"` UnderlyingRequest map[string]interface{} `json:"underlyingRequest"` FinalRequest map[string]interface{} `json:"finalRequest"` SubFraction float64 `json:"subFraction"` WorkerConnection *websocket.Conn ConnWriteMutex *sync.Mutex ConnReadMutex *sync.Mutex }
type ChildJobDistribution ¶ added in v0.1.4
type ChildJobDistribution struct {
ChildJobs []*ChildJob `json:"jobs"`
}
type CollectionContext ¶
type CollectionContext struct { Variables []libWorker.KeyValueItem `json:"variables"` Name string `json:"name"` }
type Distribution ¶
type EnvironmentContext ¶
type EnvironmentContext struct { Variables []libWorker.KeyValueItem `json:"variables"` Name string `json:"name"` }
type Job ¶
type Job struct { Id string `json:"id"` Source string `json:"source"` SourceName string `json:"sourceName"` EnvironmentContext *EnvironmentContext `json:"environmentContext"` CollectionContext *CollectionContext `json:"collectionContext"` UnderlyingRequest map[string]interface{} `json:"underlyingRequest"` FinalRequest map[string]interface{} `json:"finalRequest"` AssignedOrchestrator string `json:"assignedOrchestrator"` Scope Scope `json:"scope"` Options *libWorker.Options `json:"options"` VerifiedDomains []string `json:"verifiedDomains"` FuncModeInfo *lib.FuncModeInfo `json:"funcModeInfo"` PermittedLoadZones []string `json:"permittedLoadZones"` MaxTestDurationMinutes int64 `json:"maxTestDurationMinutes"` MaxSimulatedUsers int64 `json:"maxSimulatedUsers"` }
type LiveService ¶ added in v0.2.0
type LiveService struct { Location string Uri string State runpb.Condition_State }
type LocalhostFile ¶
type MarkMessage ¶
type MarkMessage struct { Mark string `json:"mark"` Message interface{} `json:"message"` }
type MessageQueue ¶ added in v0.2.0
type NamedConnection ¶ added in v0.2.0
type OrchestratorMessage ¶
type RunAuthClient ¶ added in v0.2.0
type RunAuthClient interface { Services() []LiveService ExecuteService(gs BaseGlobalState, location string) (*websocket.Conn, error) CheckServiceAvailability(location string) error }
type WorkerConnections ¶ added in v0.2.0
type WorkerConnections struct { Connections map[string]*NamedConnection DefaultConnection *NamedConnection }
type WorkerMessage ¶
type WorkerState ¶
Click to show internal directories.
Click to hide internal directories.