MCPcopy Create free account
hub / github.com/kataras/iris / SwitchOptions

Struct SwitchOptions

apps/switch_options.go:8–22  ·  view source on GitHub ↗

SwitchOptions holds configuration for the switcher application.

Source from the content-addressed store, hash-verified

6 // SwitchOptions holds configuration
7 // for the switcher application.
8 SwitchOptions struct {
9 // RequestModifiers holds functions to run
10 // if and only if at least one Filter passed.
11 // They are used to modify the request object
12 // of the matched Application, e.g. modify the host.
13 //
14 // See `SetHost` option too.
15 RequestModifiers []func(*http.Request)
16 // Note(@kataras): I though a lot of API designs for that one and the current is the safest to use.
17 // I skipped the idea of returning a wrapped Application to have functions like app.UseFilter
18 // or the idea of accepting a chain of Iris Handlers here because the Context belongs
19 // to the switcher application and a new one is acquired on the matched Application level,
20 // so communication between them is not possible although
21 // we can make it possible but lets not complicate the code here, unless otherwise requested.
22 }
23
24 // SwitchOption should be implemented by all options
25 // passed to the `Switch` package-level last variadic input argument.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected