MCPcopy Create free account
hub / github.com/AdRoll/baker / NewRandom

Function NewRandom

input/inputtest/random.go:39–48  ·  view source on GitHub ↗

NewRandom creates a Random baker input.

(cfg baker.InputParams)

Source from the content-addressed store, hash-verified

37
38// NewRandom creates a Random baker input.
39func NewRandom(cfg baker.InputParams) (baker.Input, error) {
40 if cfg.DecodedConfig == nil {
41 cfg.DecodedConfig = &RandomConfig{}
42 }
43 dcfg := cfg.DecodedConfig.(*RandomConfig)
44 dcfg.fillDefaults()
45 return &Random{
46 Cfg: dcfg,
47 }, nil
48}
49
50func (r *Random) Run(output chan<- *baker.Data) error {
51

Callers

nothing calls this directly

Calls 1

fillDefaultsMethod · 0.45

Tested by

no test coverage detected