MCPcopy Index your code
hub / github.com/go-redsync/redsync / NewScript

Function NewScript

redis/redis.go:38–40  ·  view source on GitHub ↗

NewScript returns a new script object. If keyCount is greater than or equal to zero, then the count is automatically inserted in the EVAL command argument list. If keyCount is less than zero, then the application supplies the count as the first value in the keysAndArgs argument to the Do, Send and S

(keyCount int, src, hash string)

Source from the content-addressed store, hash-verified

36// SendHash methods.
37// Taken from https://github.com/gomodule/redigo/blob/46992b0f02f74066bcdfd9b03e33bc03abd10dc7/redis/script.go#L32-L41
38func NewScript(keyCount int, src, hash string) *Script {
39 return &Script{keyCount, src, hash}
40}

Callers 2

testScriptHashFunction · 0.92
scripts.goFile · 0.92

Calls

no outgoing calls

Tested by 1

testScriptHashFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…