Documentation ¶
Overview ¶
DO NOT EDIT.. COPY FROM bifrost/app/components/synthetics/helper.go
Index ¶
- func CreateScriptSnippet(req SyntheticCheck) string
- func TimerNew(fun func(), fireInNs time.Duration, interval time.Duration) func()
- type AlertConditionsOptions
- type AssertionsCasesOptions
- type AssertionsOptions
- type Authentication
- type AwsSignature
- type Basic
- type CaseOptions
- type CheckState
- type CheckTestRequest
- type CheckTestRequestHeaders
- type ClientCertificate
- type Config
- type Digest
- type GRPCPayloadOptions
- type HTTPHeadersOptions
- type HTTPMultiStepsOptions
- type HTTPMultiStepsRequest
- type HTTPPayloadOptions
- type ICMPPayloadOptions
- type Mode
- type MonitorOptions
- type Ntlm
- type Oauth21
- type RequestBody
- type RequestOptions
- type SpecifyFrequencyOptions
- type SpecifyTimeRange
- type SyntheticCheck
- type SyntheticsExpectMeta
- type SyntheticsModel
- type SyntheticsRequestOptions
- type SyntheticsTags
- type Timer
- type UDPPayloadOptions
- type WSPayloadAuthentication
- type WSPayloadHeaders
- type WSPayloadOptions
- type Worker
- func (w *Worker) DirectRun(v SyntheticCheck) (map[string]interface{}, error)
- func (w *Worker) RealDirectRun(v SyntheticCheck) (map[string]interface{}, error)
- func (w *Worker) Run()
- func (w *Worker) SubscribeUpdates(topic string, token string)
- func (w *Worker) UnsubscribeUpdates(topic string, token string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateScriptSnippet ¶
func CreateScriptSnippet(req SyntheticCheck) string
Types ¶
type AlertConditionsOptions ¶
type AssertionsCasesOptions ¶
type AssertionsCasesOptions struct {
Cases []CaseOptions `json:"cases"`
}
type AssertionsOptions ¶
type AssertionsOptions struct { HTTP AssertionsCasesOptions `json:"http"` TCP AssertionsCasesOptions `json:"tcp"` Ssl AssertionsCasesOptions `json:"ssl"` DNS AssertionsCasesOptions `json:"dns"` WebSocket AssertionsCasesOptions `json:"web_socket"` UDP AssertionsCasesOptions `json:"udp"` ICMP AssertionsCasesOptions `json:"icmp"` GRPC AssertionsCasesOptions `json:"grpc"` }
type Authentication ¶
type Authentication struct { ClientCertificate ClientCertificate `json:"client_certificate"` Type string `json:"type"` Basic Basic `json:"basic"` Digest Digest `json:"digest"` Ntlm Ntlm `json:"ntlm"` AwsSignature AwsSignature `json:"aws_signature"` Oauth21 Oauth21 `json:"oauth2_1"` }
type AwsSignature ¶
type CaseOptions ¶
type CheckState ¶
type CheckState struct {
// contains filtered or unexported fields
}
type CheckTestRequest ¶
type CheckTestRequestHeaders ¶
type ClientCertificate ¶
type GRPCPayloadOptions ¶
type GRPCPayloadOptions struct { CheckType string `json:"check_type" default:"behaviour"` Service string `json:"service"` ServiceDefinition string `json:"service_definition"` MethodSelection string `json:"method_selection"` ProtoFileContent string `json:"proto_file_content"` Message string `json:"message"` IgnoreServerCertificateError bool `json:"ignore_server_certificate_error"` Metadata []struct { Name string `json:"name"` Value string `json:"value"` } `json:"metadata"` Certificate string `json:"certificate"` PrivateKey string `json:"private_key"` }
type HTTPHeadersOptions ¶
type HTTPMultiStepsOptions ¶
type HTTPMultiStepsOptions struct { StepName string `json:"step_name"` Endpoint string `json:"endpoint"` Expect SyntheticsExpectMeta `json:"expect"` Request HTTPMultiStepsRequest `json:"request"` }
type HTTPMultiStepsRequest ¶
type HTTPMultiStepsRequest struct { HTTPMethod string `json:"http_method"` HTTPVersion string `json:"http_version"` HTTPHeaders []HTTPHeadersOptions `json:"http_headers"` HTTPPayload HTTPPayloadOptions `json:"http_payload"` }
type HTTPPayloadOptions ¶
type HTTPPayloadOptions struct { FollowRedirects bool `json:"follow_redirects"` IgnoreServerCertificateError bool `json:"ignore_server_certificate_error"` Cookies string `json:"cookies"` QueryParams []struct { Name string `json:"name"` Value string `json:"value"` } `json:"query_params"` RequestBody RequestBody `json:"request_body"` Privacy struct { SaveBodyResponse bool `json:"save_body_response"` } `json:"privacy"` Proxy struct { URL string `json:"url"` Headers []struct { Name string `json:"name"` Value string `json:"value"` } `json:"headers"` } `json:"proxy"` Authentication Authentication `json:"authentication"` }
type ICMPPayloadOptions ¶
type ICMPPayloadOptions struct {
PingsPerTest int `json:"pings_per_test"`
}
type MonitorOptions ¶
type MonitorOptions struct { Source string `json:"source"` // slack, email, webhook, etc NotifyTo []interface{} `json:"notify_to"` Renotify bool `json:"renotify"` RenotifyIntervalSeconds int `json:"renotify_interval_seconds"` Priority string `json:"priority"` TriggerFailsCase bool `json:"trigger_fails_case"` TriggerFailsCaseCount int `json:"trigger_fails_case_count"` }
type Oauth21 ¶
type Oauth21 struct { CredentialsType string `json:"credentials_type"` TokenAPIAuthentication string `json:"token_api_authentication"` AccessTokenURL string `json:"access_token_url"` Username string `json:"username"` Password string `json:"password"` ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` Audience string `json:"audience"` Resource string `json:"resource"` Scopes string `json:"scopes"` }
type RequestBody ¶
type RequestOptions ¶
type SpecifyFrequencyOptions ¶
type SpecifyFrequencyOptions struct { Type string `json:"type"` IntervalType string `json:"interval_type"` SpecifyTimeRange SpecifyTimeRange `json:"specify_time_range"` }
type SpecifyTimeRange ¶ added in v1.0.15
type SyntheticCheck ¶
type SyntheticCheck struct { Uid string //Not string SyntheticsModel }
type SyntheticsExpectMeta ¶
type SyntheticsExpectMeta struct { HttpCode int `json:"http_status_code,omitempty"` ResponseText string `json:"response_text,omitempty"` ResponseTimeLessThen int `json:"response_time_less_then,omitempty"` PacketLossLimit float64 `json:"packet_loss_limit,omitempty"` LatencyLimit float64 `json:"latency_limit,omitempty"` }
type SyntheticsModel ¶
type SyntheticsModel struct { Id int `json:"id"` AccountId int `json:"account_id"` UserId int `json:"user_id"` Proto string `json:"proto"` SlugName string `json:"slug_name"` Endpoint string `json:"endpoint"` IntervalSeconds int `json:"interval_seconds"` Locations string `json:"locations"` Status string `json:"status"` Tags []string `json:"tags"` Expect SyntheticsExpectMeta `json:"expect"` Request SyntheticsRequestOptions `json:"request"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Action string `json:"action"` AccountKey string `json:"account_key"` AccountUID string `json:"account_uid"` Details map[string]interface{} `json:"details"` CheckTestRequest CheckTestRequest `json:"check_test_request"` }
type SyntheticsRequestOptions ¶
type SyntheticsRequestOptions struct { Topic string `json:"topic" default:"locations"` Premise []string `json:"premise"` Environment []interface{} `json:"environment"` TTL bool `json:"ttl"` SslSignedCertificate bool `json:"ssl_signed_certificate"` SslRevokedCertificateFail bool `json:"ssl_revoked_certificate_fail"` SslServerName string `json:"ssl_server_name"` SslCertificatePrivateKey string `json:"ssl_certificate_private_key"` SslCertificate string `json:"ssl_certificate"` SslMinVersion int `json:"ssl_min_version"` SslMaxVersion int `json:"ssl_max_version"` DNSServer string `json:"dns_server"` ICMPPayload ICMPPayloadOptions `json:"icmp_payload"` Port string `json:"port"` HTTPMethod string `json:"http_method"` HTTPVersion string `json:"http_version"` HTTPHeaders []HTTPHeadersOptions `json:"http_headers"` HTTPPayload HTTPPayloadOptions `json:"http_payload"` GRPCPayload GRPCPayloadOptions `json:"grpc_payload"` UDPPayload UDPPayloadOptions `json:"udp_payload"` WSPayload WSPayloadOptions `json:"ws_payload"` SpecifyFrequency SpecifyFrequencyOptions `json:"specify_frequency"` Assertions AssertionsOptions `json:"assertions"` AlertConditions AlertConditionsOptions `json:"alert_conditions"` Monitor MonitorOptions `json:"monitor"` CurrentAction string `json:"current_action" default:"play"` StepTestIndex int `json:"step_test_index"` HTTPMultiTest bool `json:"http_multi_test"` HTTPMultiSteps []HTTPMultiStepsOptions `json:"http_multi_steps"` }
type SyntheticsTags ¶
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
func SetTimeout ¶
SetTimeout runs the specified function after waiting the specified duration (defined in milliseconds)
type UDPPayloadOptions ¶
type UDPPayloadOptions struct {
Message string `json:"message"`
}
type WSPayloadAuthentication ¶
type WSPayloadHeaders ¶
type WSPayloadOptions ¶
type WSPayloadOptions struct { Message string `json:"message"` Headers []WSPayloadHeaders `json:"headers"` Authentication WSPayloadAuthentication `json:"authentication"` }
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is the main worker struct
func (*Worker) DirectRun ¶ added in v1.0.2
func (w *Worker) DirectRun(v SyntheticCheck) (map[string]interface{}, error)
func (*Worker) RealDirectRun ¶ added in v1.0.10
func (w *Worker) RealDirectRun(v SyntheticCheck) (map[string]interface{}, error)
func (*Worker) SubscribeUpdates ¶
func (*Worker) UnsubscribeUpdates ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.