Documentation ¶
Overview ¶
Package internal is supporting code used by server.go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseSampler ¶
BaseSampler constructs an object that decides how often to sample traces.
The spec is a string in one of the forms:
- `X%` - to sample approximately X percent of requests.
- `Xqps` - to produce approximately X samples per second.
Returns an error if the spec can't be parsed.
func CloudAuthMiddleware ¶
func CloudAuthMiddleware(callers []string, header string, rejected func(*router.Context)) router.MiddlewareChain
CloudAuthMiddleware returns a middleware chain that authorizes requests from Cloud Tasks, Cloud Scheduler and Cloud Pub/Sub.
Checks OpenID Connect tokens have us in the audience, and the email in them is in `callers` list.
If `header` is set, will also accept requests that have this header, regardless of its value. This is used to authorize GAE tasks and crons based on `X-AppEngine-*` headers.
func GateSampler ¶
GateSampler returns a sampler that calls the callback to decide if the span should be sampled.
If the callback returns false, the span will not be sampled.
If the callback returns true, the decision will be handed over to the given base sampler.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package gae implements minimal support for using some bundled GAE APIs.
|
Package gae implements minimal support for using some bundled GAE APIs. |
Package testpb contains protobufs used by server's unit tests.
|
Package testpb contains protobufs used by server's unit tests. |