Documentation
¶
Overview ¶
Package apimonitor observes local API lifecycle and request metadata in memory. Its ResponseWriter facade tracks operations that ResponseController would otherwise reach through Unwrap, while retaining each operation's downstream errors and behavior. It deliberately never retains request headers, bodies, query strings or fragments.
Index ¶
Constants ¶
const ( MaxRequests = 500 BucketCount = 60 BucketDuration = 5 * time.Second MaxServers = 32 MaxRouteLength = 160 MaxMethodLength = 16 )
Variables ¶
var Default = &Registry{}
Default is the process-local observer for the current local API service.
var ErrRegistryFull = errors.New(registryFullError)
Functions ¶
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry aggregates independent server instances. A full registry evicts one stopped instance; if every slot is live, NewServer returns a non-admitted monitor in the explicit "error" state and preserves every existing server.
func (*Registry) NewServerChecked ¶
NewServerChecked provides an error-returning admission path for new callers.