Documentation
¶
Overview ¶
Package mode names the configurations the gateway can play (flag --mode, variable EDIGATE_MODE). One binary plays every configuration of the benchmark with the same tool names, so a harness changes only the flag.
Input: the text of the flag. Output: a Mode and the answers to "which protection is on". Only the protections that the modes switch are asked here; the code of a protection that stays on does not look at the mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var All = []Mode{Full, Plain, ReqHash, NoSanitize, NoPolicy, NoBizKey, NoContracts}
All lists the modes in the order of the protocol.
Functions ¶
This section is empty.
Types ¶
type Mode ¶
type Mode string
Mode is one configuration of the gateway.
const ( // Full is C3: every protection on. Full Mode = "full" // Plain is C0 (and C2 behind an agentgateway): tools with open arguments and synchronous // calls of the mocks, no protection of the gateway. Plain Mode = "plain" // ReqHash is C1: plain, plus a key of the tool and the arguments with a stored result. ReqHash Mode = "reqhash" // NoSanitize is C3-A1: full, but the partner text is shown and the effects take the raw values. NoSanitize Mode = "no-sanitize" // NoPolicy is C3-A2: full, but the policy allows every call. NoPolicy Mode = "no-policy" // NoBizKey is C3-A3: full, but the key is made of the raw arguments of the call. NoBizKey Mode = "no-bizkey" // NoContracts is C3-A4: full, but the effect tools take their values from the model. NoContracts Mode = "no-contracts" )
func Parse ¶
Parse reads the text of the flag. An empty text means Full; an unknown one is an error.
func (Mode) ModelValues ¶
ModelValues reports whether the tools with an effect take their values from the arguments the model writes (the schemas of the open tools).