Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewS3Archiver ¶
func NewS3Archiver(region, bucket, prefix string, opts ...Option) (midware.Middleware, error)
NewS3Archiver returns a middleware that archives requests to an AWS S3 bucket. The request bodies are copied then written to S3 in a separate goroutine. Requests are assumed to have a trace header (AKA request ID) implemented as the TraceHeaders middleware. The ID will be appended to prefix to generate the key for the request document.
Types ¶
type Option ¶
type Option func(*config)
Option represents an Archiver configuration option
func WithIgnoredPath ¶
WithIgnoredPath sets a URL path that will skipped by the archiver. It can be called more than once.
func WithLogBase ¶
WithLogBase sets a base logrus Entry for logging of errors.
func WithTimeout ¶
WithTimeout sets the timeout for archival goroutines. Defaults to 1 minute.
func WithTraceHeader ¶
WithTraceHeader overrides the default trace header.