Documentation
¶
Index ¶
- Constants
- func CurrentServiceURL(ctx context.Context, service *observability.Service, ...) (string, bool, error)
- func Due(row *Result, currentHash string, retestInterval time.Duration, now time.Time) bool
- func Eligibility(item *observability.ProviderObservation, ...) (string, string)
- func MeasuredFailure(code string) bool
- func NonMeasuredFailureCodes() []string
- func Priority(endorsed, approved, bound bool) int
- func URLHash(value string) string
- type Checkpoint
- type Input
- type Measurement
- type Result
- type State
- type SuccessfulMeasurement
- type UploadProbe
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func CurrentServiceURL ¶
func Eligibility ¶
func Eligibility(item *observability.ProviderObservation, profile *observability.ProviderProfile) (string, string)
Eligibility uses the same provider evidence for admission and action views.
func MeasuredFailure ¶
MeasuredFailure treats unknown failures as completed measurements.
func NonMeasuredFailureCodes ¶
func NonMeasuredFailureCodes() []string
NonMeasuredFailureCodes identifies failures eligible for automatic remeasurement.
Types ¶
type Checkpoint ¶
type Measurement ¶
type Result ¶
type Result struct {
bun.BaseModel `bun:"table:provider_upload_speed_tests"`
ProviderID string `bun:"provider_id,pk,type:text" json:"-"`
State State `bun:"state,type:text,notnull" json:"state"`
ServiceURLHash string `bun:"service_url_hash,type:text,notnull" json:"-"`
SampleBytes int64 `bun:"sample_bytes,notnull" json:"sample_bytes"`
DurationMS *int64 `bun:"duration_ms" json:"duration_ms,omitempty"`
BytesPerSecond *int64 `bun:"bytes_per_second" json:"bytes_per_second,omitempty"`
TestedAt *time.Time `bun:"tested_at" json:"tested_at,omitempty"`
FailureCode *string `bun:"failure_code,type:text" json:"failure_code,omitempty"`
ActiveTaskID *int64 `bun:"active_task_id" json:"-"`
CreatedAt time.Time `bun:"created_at,notnull" json:"-"`
UpdatedAt time.Time `bun:"updated_at,notnull" json:"-"`
}
type SuccessfulMeasurement ¶
type SuccessfulMeasurement struct {
SampleBytes int64 `json:"sample_bytes"`
DurationMS int64 `json:"duration_ms"`
BytesPerSecond int64 `json:"bytes_per_second"`
TestedAt time.Time `json:"tested_at"`
}
SuccessfulMeasurement is a historical reference, independent of current admission.
type UploadProbe ¶
type UploadProbe interface {
Probe(context.Context, string) (Measurement, error)
}
UploadProbe measures one upload sample against a provider service URL.
Click to show internal directories.
Click to hide internal directories.