Documentation
¶
Overview ¶
Package capture provides a partitioned upstream that remembers the last request it received per path. It exists for policies that rewrite a request on the way in and rewrite the response back on the way out (masking, redaction): the client-visible response can never show what the upstream actually received, because the response-side rewrite has already reversed it by the time a test observes that response. This service lets a test ask the upstream directly, in a second call, independent of any response rewriting.
Index ¶
Constants ¶
const Port = 3010
Port is the container port used by the testbench.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements testbench.Service and testbench.Partitioned.
func NewWithRetentionLimit ¶
NewWithRetentionLimit returns a capture service with a per-partition limit on distinct paths. A non-positive limit uses the safe default.
func (*Service) PartitionKey ¶
PartitionKey returns the partitioning strategy used by this stateful service.