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 CollectionContext
- type Distribution
- type EnvironmentContext
- type FunctionAuthClient
- type FunctionResult
- type Job
- type LiveFunction
- type LocalhostFile
- type MarkMessage
- type NamedClient
- type OrchestratorMessage
- type OrchestratorOrWorkerMessage
- type Scope
- type WorkerClients
- 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) GetChildJobStates() []WorkerState SetChildJobState(workerId string, childJobId string, status string) CreditsManager() *lib.CreditsManager Standalone() bool FuncMode() bool FuncAuthClient() FunctionAuthClient }
type BaseMetricsStore ¶
type BaseMetricsStore interface { InitMetricsStore(options *libWorker.Options) AddMessage(message WorkerMessage, workerLocation string, subFraction float64) error Stop() FlushMetrics() }
Cached metrics are stored before being collated and sent
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 FunctionAuthClient ¶ added in v0.1.1
type FunctionAuthClient interface { Functions() []LiveFunction ExecuteFunction(location string, childJobPayload ChildJob) (*(chan FunctionResult), error) CheckFunctionAvailability(location string) error }
type FunctionResult ¶ added in v0.1.1
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 LiveFunction ¶ added in v0.1.1
type LiveFunction struct { Location string Uri string State functionspb.Function_State }
type LocalhostFile ¶
type MarkMessage ¶
type MarkMessage struct { Mark string `json:"mark"` Message interface{} `json:"message"` }
type NamedClient ¶
type NamedClient struct { Name string Client *redis.Client }
type OrchestratorMessage ¶
type WorkerClients ¶
type WorkerClients struct { Clients map[string]*NamedClient DefaultClient *NamedClient }
type WorkerMessage ¶
type WorkerState ¶
Click to show internal directories.
Click to hide internal directories.