Documentation
¶
Overview ¶
Package capture takes a backup of a Chef Infra Server compatible server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromAPI ¶
FromAPI crawls the whole server through c and writes every object it finds to w, exactly as the server returned it. c must sign as a superuser; its Config.Org is not used. An object that disappears between being listed and being read is skipped with a warning; any other failure stops the backup.
func RedirectPolicy ¶
RedirectPolicy returns an http.Client CheckRedirect that applies FromAPI's file-host rules to every redirect hop, so an allowed host cannot send a cookbook file fetch elsewhere. Install it on the client passed to FromAPI: cinc-api follows redirects for file transfers (S3 redirects across regions) and never for signed requests.
Types ¶
type Options ¶
type Options struct {
// Concurrency bounds the requests in flight. Zero means 8.
Concurrency int
// BlobHosts lists extra hosts (host or host:port) cookbook files may be
// fetched from, such as the S3 endpoint of an external bookshelf. Files
// on the server's own host are always allowed; any other URL in a
// manifest is refused.
BlobHosts []string
}
Options tune a backup.