MCPcopy Index your code
hub / github.com/zalando/skipper / NewLuaScriptWithOptions

Function NewLuaScriptWithOptions

script/script.go:66–78  ·  view source on GitHub ↗

NewLuaScriptWithOptions creates a new filter spec with options

(opts LuaOptions)

Source from the content-addressed store, hash-verified

64
65// NewLuaScriptWithOptions creates a new filter spec with options
66func NewLuaScriptWithOptions(opts LuaOptions) (filters.Spec, error) {
67 sources := opts.Sources
68 if len(sources) == 0 {
69 // backwards compatible default, allow all
70 sources = append(sources, "file", "inline")
71 } else if contains("none", opts.Sources) {
72 sources = nil
73 }
74 return &luaScript{
75 modules: opts.Modules,
76 sources: sources,
77 }, nil
78}
79
80// Name returns the name of the filter ("lua")
81func (ls *luaScript) Name() string {

Callers 3

runFunction · 0.92
NewLuaScriptFunction · 0.85
newFilterFunction · 0.85

Calls 1

containsFunction · 0.70

Tested by 1

newFilterFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…