Documentation
¶
Overview ¶
Package model is SPECTRE's data model: the traffic that crosses a service's boundary through its proxies, and why a candidate was quarantined.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Direction ¶
type Direction string
Direction names the proxy that carries traffic: ingress into the service, or egress from it to a dependency.
type Protocol ¶
type Protocol string
Protocol names the protocol that a proxy intercepts, e.g. "http".
const ProtocolHTTP Protocol = "http"
ProtocolHTTP is the protocol of HTTP servers, including gRPC and Connect.
type Quarantine ¶
type Quarantine struct {
Reason QuarantineReason
Since time.Time
}
Quarantine is a quarantine in effect: why it began and when.
type QuarantineKind ¶
type QuarantineKind string
QuarantineKind is why the candidate was quarantined.
const ( // QuarantineDivergent means the candidate's responses differ from the reference's. QuarantineDivergent QuarantineKind = "divergent" // QuarantineUnable means the mirror could not compare or replay traffic. QuarantineUnable QuarantineKind = "unable" // QuarantineUnmatched means the candidate made a dependency request the reference did not. QuarantineUnmatched QuarantineKind = "unmatched" // QuarantineUnlisted means an ingress route is in no node of the migration state. QuarantineUnlisted QuarantineKind = "unlisted" // QuarantineCapacity means candidate work exceeded a concurrency or buffer limit. QuarantineCapacity QuarantineKind = "capacity" // QuarantinePairing means the mirror could not pair candidate and reference traffic. QuarantinePairing QuarantineKind = "pairing" )
type QuarantineReason ¶
type QuarantineReason struct {
Kind QuarantineKind
// Traffic is the request that triggered quarantine.
Traffic Option[Traffic]
// Node is the migration state node that owns an ingress route.
Node Option[string]
// Differences are the field paths of a divergence, without values.
Differences []string
Detail string
}
QuarantineReason is why the candidate was quarantined. Detail and Differences must never quote payload values, because reasons are reported outside the mirror.
func (QuarantineReason) String ¶
func (r QuarantineReason) String() string
String describes the reason for logs.