Documentation
¶
Overview ¶
Package api exposes the agent's HTTP API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressBlock ¶ added in v0.1.2
AddressBlock groups source addresses for the login.fail budget and the connection cap: an IPv4 address (mapped in IPv6 or not), or the /64 of an IPv6 address (one host gets a whole /64). Anything else stays as is.
func ConfigureServer ¶ added in v0.1.2
ConfigureServer sets the delays of the agent's server. No WriteTimeout: it would cut the logs stream and long downloads, whose writes have their own deadlines.
Types ¶
type Deps ¶
type Deps struct {
Docker dockerx.Client
// Views is the cache of the indexes of stopped containers; nil:
// fsview.NewViews(Docker, fsview.DefaultOptions()).
Views *fsview.Views
// OpenFS opens the file view of a container by full ID; nil means
// Views.For. API tests give an in-memory view.
OpenFS func(ctx context.Context, id string) (fsview.FS, error)
Verifier *auth.Verifier
Sessions *auth.Sessions
Limiter *auth.Limiter
Audit *audit.Log
Version string
ReadOnly bool
TLS bool
PublicOrigin string // normalized, or ""
Static http.Handler // embedded UI; nil in API tests
ScriptHashes []string // CSP sources of the UI's inline scripts (web.ScriptHashes)
// Snapshots is the store of spec v0.2 §5.7 (snapshot.Unavailable when
// refused at startup); nil: the snapshot routes answer internal.
Snapshots *snapshot.Store
}
Source Files
¶
- changes.go
- container.go
- count.go
- figures.go
- fs.go
- fs_download.go
- fs_preview.go
- fs_search.go
- fs_write.go
- fserr.go
- fsguard.go
- images.go
- images_fs.go
- logs.go
- middleware.go
- respond.go
- routes.go
- routes_figures.go
- routes_images.go
- routes_images_fs.go
- routes_search.go
- routes_secrets.go
- routes_snapshots.go
- routes_snapshots_compare.go
- secrets_inventory.go
- server.go
- snapshots.go
- snapshots_compare.go
Click to show internal directories.
Click to hide internal directories.