MCPcopy Create free account

hub / github.com/Comcast/rulio / functions

Functions1,122 in github.com/Comcast/rulio

↓ 649 callersFunctionLog
Log is the top-level API for logging everything. 'Args' should have an odd number or args. The first arg should be a string, which is typically the
core/log.go:480
↓ 132 callersMethodError
()
core/errors.go:25
↓ 74 callersFunctionmapJS
MapJS makes a Map from JSON. If it fails, it panics, so don't use outside of tests.
core/util_test.go:51
↓ 69 callersMethodAdd
(ctx *Context, id string, x Map)
core/state.go:35
↓ 68 callersFunctionNewTimer
NewTimer makes a new timer with the given name. Ctx is optional. If provided and if its system's configuration 'Timing' parameter is false, the a no
core/timers.go:43
↓ 68 callersMethodStop
Stop computes the elapsed time (in nanosecs) and stores it in the history.
core/timers.go:96
↓ 57 callersFunctionNow
Now returns the current time in UTC nanoseconds.
core/util.go:176
↓ 57 callersFunctionthrowJavascript
Suggested at https://github.com/robertkrimen/otto/issues/17.
core/javascript.go:113
↓ 45 callersFunctionGetStringParam
(m map[string]interface{}, p string, required bool)
service/service.go:128
↓ 45 callersFunctionInc
Inc atomically updates the given counter.
core/util.go:237
↓ 45 callersFunctionoutput
(media string, control string, args ...interface{})
doc/api/rulesapi.go:56
↓ 44 callersFunctioncheckSearch
checkSearch queries a PatternIndex and checks the results. First parse 'js' as JSON representation of a fact/event. The query the given PatternIndex
core/patternindex_test.go:50
↓ 42 callersFunctionNewPatternIndex
NewPatternIndex does exactly what you think it does.
core/patternindex.go:60
↓ 42 callersMethodString
()
core/storage.go:29
↓ 41 callersFunctionNewContext
(prefix string)
core/context.go:180
↓ 40 callersMethodIncErrors
IncErrors increments stats.ErrorCount if err isn't nil.
core/stats.go:159
↓ 39 callersMethodClose
(ctx *Context)
core/storage.go:53
↓ 38 callersMethodAdd
Index the given fact ID at the given term.
core/termindex.go:95
↓ 38 callersMethodAddPatternJSON
AddPatternJSON adds the given pattern (as JSON) to the index.
core/patternindex_test.go:36
↓ 34 callersMethodSet
(x interface{})
core/javascript.go:445
↓ 30 callersMethodSetLoc
(loc *Location)
core/context.go:112
↓ 27 callersFunctionRunJavascript
RunJavascript executes Javascript code with the given bindings. A new environment is created for each call. That environment contains several bindin
core/javascript.go:511
↓ 26 callersMethodGetLoc
()
core/context.go:117
↓ 26 callersFunctionMetric
(ctx *Context, args ...interface{})
core/log.go:575
↓ 25 callersMethodAddFact
(ctx *Context, id string, fact Map)
core/location.go:459
↓ 25 callersMethodGet
(ctx *Context, id string)
core/state.go:38
↓ 25 callersMethodfindLocation
findLocation is the main function for getting a location. This function delegates the hard work to 'sys.CachedLocations.Open()'.
sys/system.go:855
↓ 23 callersMethodreleaseLocation
releaseLocation is the counterpart to 'findLocation'. Call this function to let the cache know that you are done with some work for a location.
sys/system.go:864
↓ 22 callersMethodAddFact
AddFact add a fact to the given location. Returns the ID for the fact.
sys/system.go:910
↓ 22 callersMethodControl
()
core/location.go:91
↓ 22 callersFunctionNewLocation
(ctx *Context, name string, state State, ctrl *Control)
core/location.go:152
↓ 22 callersFunctionPoint
Point generates a log line that reports point that applications might want to monitor. A system dashboard is a good example. This function is not a
core/log.go:613
↓ 21 callersMethodcheckLocal
checkLocal is a little utility wrapper around Manager.Disposition. This function will return an error with a JSON message if the given location shoul
service/service.go:161
↓ 20 callersFunctionBenchContext
(appId string)
core/context.go:264
↓ 18 callersMethodEnabled
(ctx *Context)
core/location.go:205
↓ 18 callersFunctionNewMemStorage
(ctx *Context)
core/storage_mem.go:32
↓ 16 callersFunctionTestContext
(prefix string)
core/context.go:184
↓ 14 callersMethodClear
(ctx *Context)
core/state.go:43
↓ 14 callersMethodClearLocation
ClearLocation should (!) clear all the state for the given location.
sys/system.go:1123
↓ 14 callersFunctionNewSyntaxError
(s string, args ...interface{})
core/errors.go:79
↓ 14 callersMethodProcessEvent
(ctx *Context, event Map)
core/events.go:455
↓ 13 callersMethodAddValue
AddValue just exists for backwards compatibility. Just calls AddProp().
core/context.go:148
↓ 13 callersMethodExec
(*Context, *Location, QueryContext, QueryResult)
core/query.go:81
↓ 13 callersMethodLoad
(ctx *Context)
core/state.go:34
↓ 13 callersMethodLog
(level LogLevel, args ...interface{})
core/log.go:77
↓ 13 callersMethodSearch
(ctx *Context, pattern Map)
core/state.go:40
↓ 13 callersMethodSearchFacts
(ctx *Context, pattern Map, includeInherited bool)
core/location.go:621
↓ 13 callersFunctionprotest
(w http.ResponseWriter, fm string, args ...interface{})
crolt/handlers.go:26
↓ 12 callersMethodAddRule
(ctx *Context, id string, rule Map)
core/location.go:311
↓ 12 callersMethodDo
Do submits work to the breaker. The work is attempted only if the breaker is closed. If the work is attempted, any resulting error is returned. The
core/breaker.go:54
↓ 12 callersMethodEmit
()
tools/sim/gen.go:29
↓ 12 callersMethodUpdate
Update sets the in-memory timestamp of the last update. If 'updating' is empty, then a value is generated using 'GenerateUpdateTimestamp()'. If 'upd
core/location.go:74
↓ 12 callersFunctionlinearState
(t *testing.T)
core/state_linear_test.go:23
↓ 11 callersMethodAddRule
AddRule adds a rule to the given location. Returns the ID for the rule.
sys/system.go:1004
↓ 11 callersMethodLocation
()
core/context.go:125
↓ 11 callersFunctionNewIndexedState
(ctx *Context, name string, store Storage)
core/state_indexed.go:107
↓ 11 callersMethodRem
(ctx *Context, id string)
core/state.go:36
↓ 11 callersFunctionindexedState
(t *testing.T)
core/state_indexed_test.go:23
↓ 10 callersMethodArray
Array returns a pointer to an array of the set's elements.
core/util.go:132
↓ 10 callersMethodClear
(ctx *Context)
core/location.go:849
↓ 10 callersFunctionExampleSystem
(name string)
sys/system.go:524
↓ 10 callersFunctionGetProp
GetProp is the high-level property API to get the property value for the given target id and prop. Default value is provided by 'def'.
core/state.go:266
↓ 10 callersFunctionMustMap
(js string)
core/util.go:533
↓ 10 callersFunctionNewTermIndex
()
core/termindex.go:48
↓ 10 callersMethodProcessEvent
(ctx *Context, location string, event string)
sys/system.go:1256
↓ 10 callersFunctionpiExample
(ctx *Context, i *PatternIndex, js string, id string)
core/patternindex_test.go:386
↓ 10 callersMethodslock
(ctx *Context, read bool)
core/state_linear.go:60
↓ 10 callersMethodslock
(ctx *Context, read bool)
core/state_indexed.go:76
↓ 10 callersMethodsunlock
(ctx *Context, read bool)
core/state_linear.go:72
↓ 10 callersMethodsunlock
(ctx *Context, read bool)
core/state_indexed.go:88
↓ 9 callersMethodClone
Clone gives a clean copy of the given ServiceStats.
core/stats.go:60
↓ 9 callersFunctionCopy
Copy mostly provides a deep copy of maps.
core/util.go:555
↓ 9 callersMethodDelete
(ctx *Context)
core/state.go:37
↓ 9 callersMethodNext
()
tools/sim/gen.go:164
↓ 9 callersMethodQuery
Query runs a query in the given location. For testing.
sys/system.go:1197
↓ 9 callersFunctionRuleFromMap
RuleFromMap generates a Rule from a map.
core/rules.go:186
↓ 9 callersMethodSearch
Search the index. The algorithm is current pretty naive but reasonably efficient. We start with a term that has the lowest cardinality. The set of
core/termindex.go:159
↓ 9 callersFunctionSetProp
SetProp is the high-level property setter. The given id is the target id.
core/state.go:274
↓ 9 callersFunctionTestingLocation
(t *testing.T)
core/rules_test.go:94
↓ 9 callersFunctiondoQueryTest
(t *testing.T, facts []string, query string, bss string, initialBss ...Bindings)
core/query_test.go:151
↓ 9 callersFunctiongetMapParam
Return a 'map[string]interface{}' value, whether the value was found, and any error. If 'required' is true and the property is missing, return an err
service/service.go:94
↓ 8 callersMethodContains
Contains reports whether the given string is in the set
core/util.go:106
↓ 8 callersFunctionNewCron
NewCron creates a new Cron instanced. If the given broadcaster in nil, SysCronBroadcaster is used. Name is opaque; just for logging.
cron/cron.go:194
↓ 8 callersFunctionNewLinearState
(ctx *Context, name string, store Storage)
core/state_linear.go:84
↓ 8 callersFunctionNewNotFoundError
(s string, args ...interface{})
core/errors.go:99
↓ 8 callersMethodisPrivileged
(region string)
core/context.go:170
↓ 8 callersFunctionprotest
(response, message)
examples/add.py:33
↓ 7 callersMethodAdd
Add creates a new cron job. Use the ID to Rem() that job later if you want. F is the work to be performed. The first argument is the scheduled time
cron/cron.go:492
↓ 7 callersMethodAddPatternMap
AddPatternJSON adds the given pattern (as a map) to the index.
core/patternindex.go:508
↓ 7 callersMethodCheckRead
(ctx *Context)
core/location.go:142
↓ 7 callersMethodCheckWrite
(ctx *Context)
core/location.go:129
↓ 7 callersMethodDo
(ctx *Context)
core/http.go:308
↓ 7 callersMethodGet
Get looks up a key's value from the cache.
core/cache.go:74
↓ 7 callersFunctionGetPropString
GetPropString is a wrapper around 'getProp' that returns a string value.
core/state.go:196
↓ 7 callersMethodLoad
(ctx *Context, loc string)
core/storage_mem.go:47
↓ 7 callersFunctionNewHTTPRequest
NewHTTPRequest generates a basic HTTPRequest using some defaults from SystemParameters. You can customize the returned instance. For example, you ca
core/http.go:153
↓ 7 callersMethodRemove
(ctx *Context, loc string, k []byte)
core/storage.go:45
↓ 7 callersMethodSearchPatternsJSON
SearchPatternsMap searchs the index for patterns that match the given fact (or event) (in JSON).
core/patternindex_test.go:26
↓ 7 callersFunctiongenAId
(account, id string)
crolt/cron.go:146
↓ 7 callersFunctionindent
(s string, spaces int)
doc/api/rulesapi.go:62
next →1–100 of 1,122, ranked by callers