Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDefault = Config{ Next: nil, ModifyRequest: nil, ModifyResponse: nil, }
ConfigDefault is the default config
Functions ¶
func Balancer ¶ added in v2.0.3
func Balancer(config Config) fiber.Handler
Balancer creates a load balancer among multiple upstream servers
func Do ¶ added in v2.0.3
Do performs the given http request and fills the given http response. This method can be used within a fiber.Handler
Types ¶
type Config ¶
type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Servers defines a list of <scheme>://<host> HTTP servers, // // which are used in a round-robin manner. // i.e.: "https://foobar.com, http://www.foobar.com" // // Required Servers []string // ModifyRequest allows you to alter the request // // Optional. Default: nil ModifyRequest fiber.Handler // ModifyResponse allows you to alter the response // // Optional. Default: nil ModifyResponse fiber.Handler }
Config defines the config for middleware.
Click to show internal directories.
Click to hide internal directories.