configure

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package configure translates configs into rules and settings for the router server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerPort   string
	ServerScheme string
	ServerKey    string
	ServerCert   string

	BodyRules         []modifier.PatchBodyRule
	ResHeaderRules    []modifier.PatchHeaderRule
	ResAddHeaderRules []modifier.AddHeaderRule
	ReqAddCookieRules []modifier.AddRequestCookieRule

	DefaultRequestDispatchRule modifier.RequestDispatchRule
	RequestDispatchRules       []modifier.RequestDispatchRule
	SleepRules                 []modifier.RequestSleepRule
}

Config contains the rules and settings used by the router.

func CompileConfig

func CompileConfig(conf config.Config) Config

CompileConfig turns a config (read from file) into modifier rules and settings used by the router.

Jump to

Keyboard shortcuts

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