middleware

package
v0.0.0-...-9162fdb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: GPL-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnvironmentMiddleware = func(ctx context.Context, c *app.RequestContext) {
		if env := c.Request.Header.Get(consts.EnvHeader); env != "" {
			if lane := c.Request.Header.Get(consts.LaneHeader); lane != "" {
				env = fmt.Sprintf("%s_%s", env, lane)
			}
			ctx = metadata.AppendToOutgoingContext(ctx, consts.EnvHeader, env)
		}
		c.Next(ctx)
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL