Documentation
¶
Overview ¶
Package spectre is the public API: a custom binary calls Main with options that add extensions, and inherits every built-in command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(registered *extensions)
Option registers an extension with Main.
func WithCommand ¶
WithCommand adds a top-level command. command must be a pointer to a struct, because Kong parses flags into its fields.
func WithKongOptions ¶ added in v0.28.0
WithKongOptions passes options to the parser after the built-in ones, so kong.Vars adds to the built-in variables, such as version.
func WithTemplateRepo ¶ added in v0.38.0
WithTemplateRepo sets the default repository spectre init fetches templates from: a git source such as git+ssh://github.com/org/repo, or a local directory.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
spectre
command
Command spectre runs the supervisor with its embedded proxies and generates the TypeScript schema declarations used for comparison.
|
Command spectre runs the supervisor with its embedded proxies and generates the TypeScript schema declarations used for comparison. |
|
spectre-sample
command
|
|
|
spectre-sample-forecasts
command
|
|
|
cli
Package cli is the built-in command line: its commands and the terminal output they write.
|
Package cli is the built-in command line: its commands and the terminal output they write. |
|
cli/terminal
Package terminal styles command output for terminals.
|
Package terminal styles command output for terminals. |
|
comparison
Package comparison normalises payloads with scripts, then diffs or hashes them.
|
Package comparison normalises payloads with scripts, then diffs or hashes them. |
|
comparison/javascript
Package javascript evaluates Spectre payload normaliser scripts.
|
Package javascript evaluates Spectre payload normaliser scripts. |
|
descriptors
Package descriptors loads the protobuf descriptors that gRPC and Connect wire decoding uses.
|
Package descriptors loads the protobuf descriptors that gRPC and Connect wire decoding uses. |
|
future
Package future provides a value that one goroutine sets once and others wait for.
|
Package future provides a value that one goroutine sets once and others wait for. |
|
httpserver
Package httpserver serves HTTP ingress and egress points for the protocol engine.
|
Package httpserver serves HTTP ingress and egress points for the protocol engine. |
|
httpserver/codec
Package codec decodes gRPC, Connect, and bare protobuf payloads to JSON.
|
Package codec decodes gRPC, Connect, and bare protobuf payloads to JSON. |
|
httpserver/message
Package message decodes HTTP requests and responses into engine messages.
|
Package message decodes HTTP requests and responses into engine messages. |
|
httpserver/middleware/health
Package health provides HTTP liveness and readiness middleware.
|
Package health provides HTTP liveness and readiness middleware. |
|
httpserver/middleware/logging
Package logging provides structured HTTP request logging middleware.
|
Package logging provides structured HTTP request logging middleware. |
|
httpserver/route
Package route matches HTTP requests against net/http.ServeMux patterns.
|
Package route matches HTTP requests against net/http.ServeMux patterns. |
|
jsonschema
Package jsonschema generates TypeScript schema declarations from JSON Schema.
|
Package jsonschema generates TypeScript schema declarations from JSON Schema. |
|
logger
Package logger configures structured logging and carries loggers through contexts.
|
Package logger configures structured logging and carries loggers through contexts. |
|
model
Package model is SPECTRE's data model: the traffic that crosses a service's boundary through its proxies, and why a candidate was quarantined.
|
Package model is SPECTRE's data model: the traffic that crosses a service's boundary through its proxies, and why a candidate was quarantined. |
|
netaddr
Package netaddr parses listen and backend addresses and opens or dials them.
|
Package netaddr parses listen and backend addresses and opens or dials them. |
|
protocol
Package protocol pairs the reference and candidate traffic that protocol servers report, compares ingress responses, and replays egress responses.
|
Package protocol pairs the reference and candidate traffic that protocol servers report, compares ingress responses, and replays egress responses. |
|
proxy
Package proxy admits candidate work and budgets shared memory for every protocol.
|
Package proxy admits candidate work and budgets shared memory for every protocol. |
|
sample
Package sample provides a Connect service for ingress experiments.
|
Package sample provides a Connect service for ingress experiments. |
|
scaffold
Package scaffold sets a service up for SPECTRE by rendering a template from a template repository into the spectre directory of its checkout with scaffolder.
|
Package scaffold sets a service up for SPECTRE by rendering a template from a template repository into the spectre directory of its checkout with scaffolder. |
|
schema
Package schema models the payload types that normalisers and protocols share.
|
Package schema models the payload types that normalisers and protocols share. |
|
server
Package server is the SPECTRE server, which collects the quarantines that mirrors report.
|
Package server is the SPECTRE server, which collects the quarantines that mirrors report. |
|
server/client
Package client calls the SPECTRE server.
|
Package client calls the SPECTRE server. |
|
server/storage
Package storage keeps the divergences that mirrors report to the SPECTRE server, either in memory or in Redis.
|
Package storage keeps the divergences that mirrors report to the SPECTRE server, either in memory or in Redis. |
|
state
Package state describes a service's migration state: the modules a migration moves, the IO each performs, and how far each has got.
|
Package state describes a service's migration state: the modules a migration moves, the IO each performs, and how far each has got. |
|
supervisor
Package supervisor runs a candidate and reference service behind the SPECTRE proxies, sandboxing the candidate's egress and splitting host resources with cgroups.
|
Package supervisor runs a candidate and reference service behind the SPECTRE proxies, sandboxing the candidate's egress and splitting host resources with cgroups. |
Click to show internal directories.
Click to hide internal directories.