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

Method getState

script/script.go:125–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124
125func (s *script) getState() (*lua.LState, error) {
126 select {
127 case L := <-s.pool:
128 if L == nil {
129 return nil, errors.New("pool closed")
130 }
131 return L, nil
132 default:
133 return s.newState()
134 }
135}
136
137func (s *script) putState(L *lua.LState) {
138 if s.pool == nil { // pool closed

Callers 1

runFuncMethod · 0.95

Calls 2

newStateMethod · 0.95
NewMethod · 0.80

Tested by

no test coverage detected