Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/fnproject/fn
/ functions
Functions
2,053 in github.com/fnproject/fn
⨍
Functions
2,053
◇
Types & classes
309
↓ 168 callers
Method
New
New creates a new data store from the specified URL
api/datastore/datastore.go:36
↓ 149 callers
Method
Error
()
api/agent/resource.go:91
↓ 73 callers
Method
Run
Run should execute task on the implementation. RunResult captures the result of task execution. This means if task execution fails due to a problem in
api/agent/drivers/driver.go:33
↓ 70 callers
Method
String
()
api/server/server.go:175
↓ 69 callers
Method
Err
()
api/common/ctx.go:59
↓ 69 callers
Method
Now
()
api/common/clock.go:6
↓ 68 callers
Method
Done
()
api/common/ctx.go:55
↓ 66 callers
Method
String
following encodings are slightly modified from https://github.com/oklog/ulid String returns a lexicographically sortable string encoded Id (26 charact
api/id/id.go:93
↓ 62 callers
Method
Close
()
api/agent/slots.go:24
↓ 54 callers
Method
End
End will be called immediately after attempting a call execution, regardless of whether the execution failed or not. An error will be passed to End, w
api/agent/call.go:37
↓ 53 callers
Function
New
New will generate a new Id for use. New is safe to be called from concurrent threads. SetMachineId should be called once before any calls to New are m
api/id/id.go:48
↓ 51 callers
Function
Logger
Logger returns the structured logger.
api/common/ctx.go:26
↓ 50 callers
Function
EmptyAnnotations
()
api/models/annotations.go:53
↓ 49 callers
Method
Get
Get returns a raw JSON value of a annotation key
api/models/annotations.go:158
↓ 47 callers
Function
handleErrorResponse
(c *gin.Context, err error)
api/server/error_response.go:24
↓ 46 callers
Function
MakeMeasure
(name string, desc string, unit string)
api/common/stats_utils.go:27
↓ 45 callers
Method
Error
Error is an actionable/checkable error from the container, nil if Status() returns "success", otherwise non-nil
api/agent/drivers/driver.go:90
↓ 45 callers
Method
Info
(ctx context.Context)
api/agent/drivers/docker/docker_client.go:43
↓ 44 callers
Method
String
()
api/agent/func_logger.go:73
↓ 44 callers
Method
ValidApp
ValidApp returns a valid app to use for inserts
api/datastore/datastoretest/test.go:39
↓ 43 callers
Method
Write
(b []byte)
api/agent/func_logger.go:81
↓ 42 callers
Method
Id
The id to assign the container
api/agent/drivers/driver.go:125
↓ 37 callers
Method
GivenAppInDb
(app *models.App)
api/datastore/datastoretest/test.go:115
↓ 33 callers
Method
Cleanup
()
api/datastore/datastoretest/test.go:125
↓ 33 callers
Function
CreateView
(measure stats.Measure, agg *view.Aggregation, tagKeys []string)
api/common/stats_utils.go:12
↓ 33 callers
Function
NewHarness
(t *testing.T, ctx context.Context, ds models.Datastore)
api/datastore/datastoretest/test.go:158
↓ 32 callers
Method
withRawKey
(key string, val string)
api/models/annotations_test.go:20
↓ 31 callers
Method
GetCall
GetCall will return a Call that is executable by the Agent, which can be built via various CallOpt's provided to the method.
api/agent/agent.go:65
↓ 31 callers
Function
checkClose
(t *testing.T, a Agent)
api/agent/agent_test.go:73
↓ 30 callers
Function
GetTestUtilsImage
()
test/testutils.go:12
↓ 30 callers
Function
NewMockInit
NewMockInit allows specifying certain apps/fns/triggers. args helps break tests less if we change stuff
api/datastore/mock.go:41
↓ 30 callers
Function
routerRequest
(t *testing.T, router *gin.Engine, method, path string, body io.Reader)
api/server/server_test.go:62
↓ 29 callers
Method
ValidFn
ValidFn returns a valid fn to use for inserts
api/datastore/datastoretest/test.go:41
↓ 28 callers
Method
Clone
()
api/models/fn.go:194
↓ 28 callers
Function
testServer
(ds models.Datastore, rnr agent.Agent, nodeType NodeType, opts ...Option)
api/server/server_test.go:20
↓ 27 callers
Method
Close
stop and terminate the pool
api/agent/drivers/docker/docker_pool.go:108
↓ 27 callers
Method
Wait
Wait may be called to await the result of a container's execution. If the provided context is canceled and the container does not return first, the re
api/agent/drivers/driver.go:64
↓ 27 callers
Function
setLogBuffer
()
api/server/apps_test.go:21
↓ 26 callers
Function
New
New creates an Agent that executes functions locally as Docker containers.
api/agent/agent.go:115
↓ 26 callers
Function
testRunner
(_ *testing.T, args ...interface{})
api/server/runner_httptrigger_test.go:41
↓ 26 callers
Function
vfunc
(v int64)
api/datastore/sql/migrations/migs.go:10
↓ 24 callers
Function
MakeKey
(name string)
api/common/stats_utils.go:31
↓ 23 callers
Method
Submit
Submit will attempt to execute a call locally, a Call may store information about itself in its Start and End methods, which will be called in Submit
api/agent/agent.go:73
↓ 22 callers
Method
Header
nice compiler errors
api/server/runner_fninvoke.go:42
↓ 22 callers
Method
Name
()
fnext/setup.go:12
↓ 22 callers
Method
ValidTrigger
ValidTrigger returns a valid trigger to use for inserts
api/datastore/datastoretest/test.go:43
↓ 21 callers
Method
Bytes
()
api/agent/func_logger.go:74
↓ 21 callers
Method
Sleep
(time.Duration)
api/common/clock.go:7
↓ 20 callers
Method
GivenFnInDb
(validFunc *models.Fn)
api/datastore/datastoretest/test.go:134
↓ 20 callers
Method
Model
Model will return the underlying models.Call configuration for this call.
api/agent/call.go:24
↓ 20 callers
Function
checkRange
(t *testing.T, bck BackOff, expOk bool, min, max uint64)
api/common/backoff_test.go:10
↓ 19 callers
Method
Equals
(f2 *Fn)
api/models/fn.go:215
↓ 19 callers
Function
WithWriter
WithWriter sets the writer that the call uses to send its output message to TODO this should be required
api/agent/call.go:166
↓ 19 callers
Function
unsafeBytes
WARN: this is read only
api/agent/slots.go:384
↓ 18 callers
Method
After
(time.Duration)
api/common/clock.go:8
↓ 18 callers
Function
makeTracker
Create a span/tracker with required context tags
api/agent/drivers/docker/docker_client.go:172
↓ 18 callers
Function
setLogBuffer
capture logs so they shut up when things are fine
test/fn-system-tests/system_test.go:555
↓ 17 callers
Function
FromHTTPFnRequest
FromHTTPFnRequest Sets up a call from an http trigger request
api/agent/call.go:49
↓ 17 callers
Method
Header
Header implements http.ResponseWriter, which is used by Agent to push headers to pure runner
api/agent/pure_runner.go:429
↓ 17 callers
Function
LoggerWithFields
LoggerWithFields returns a child context of the provided parent that contains a logger with additional fields from the parent's logger, it returns the
api/common/ctx.go:37
↓ 17 callers
Method
Validate
Validate validates all field values, returning the first error, if any.
api/models/fn.go:149
↓ 17 callers
Method
WriteHeader
WriteHeader implements http.ResponseWriter, which is used by Agent to push http status to pure runner
api/agent/pure_runner.go:435
↓ 17 callers
Function
getErrorResponse
(t *testing.T, rec *httptest.ResponseRecorder)
api/server/server_test.go:81
↓ 16 callers
Method
EqualsWithAnnotationSubset
(f2 *Fn)
api/models/fn.go:237
↓ 16 callers
Method
GetAppByID
GetAppByID gets an App by ID. Returns ErrAppsNotFound if no app is found.
api/models/datastore.go:11
↓ 16 callers
Function
NewConfig
NewConfig returns a config set from env vars, plus defaults
api/agent/config.go:162
↓ 16 callers
Function
NewMock
NewMock creates a new mock datastore
api/datastore/mock.go:24
↓ 16 callers
Method
String
()
api/datastore/sql/sql.go:121
↓ 15 callers
Method
Address
()
api/runnerpool/runner_pool.go:56
↓ 15 callers
Method
Closer
Closer returns a channel that is closed if WaitGroup is in closing state
api/common/wait_utils.go:62
↓ 15 callers
Method
Pop
Removes an image from the LRU cache if cache is not empty
api/agent/drivers/docker/image_cache.go:44
↓ 15 callers
Method
SetEvictable
(isEvictable bool)
api/agent/evictor.go:70
↓ 15 callers
Function
isClosed
(ch chan struct{})
api/common/wait_utils_test.go:8
↓ 14 callers
Method
Code
()
api/models/error.go:229
↓ 14 callers
Function
CreateViewWithTags
(measure stats.Measure, agg *view.Aggregation, tags []tag.Key)
api/common/stats_utils.go:17
↓ 14 callers
Method
GetTriggers
GetTriggers gets a list of triggers that match the specified filter Return ErrDatastoreEmptyAppId if no AppID set in the filter
api/models/datastore.go:71
↓ 14 callers
Function
LB
()
test/fn-system-tests/system_test.go:60
↓ 14 callers
Function
NewDocker
NewDocker implements drivers.Driver
api/agent/drivers/docker/docker.go:74
↓ 14 callers
Function
ensureApp
(t *testing.T, app *models.App)
test/fn-system-tests/exec_http_trigger_test.go:380
↓ 14 callers
Function
ensureFn
(t *testing.T, fn *models.Fn)
test/fn-system-tests/exec_http_trigger_test.go:418
↓ 14 callers
Function
execFn
simple GetCall/Submit combo.
api/agent/agent_evict_test.go:94
↓ 14 callers
Function
getApp
()
api/agent/agent_evict_test.go:73
↓ 14 callers
Function
getEnv
(key, fallback string)
api/server/init.go:71
↓ 14 callers
Function
getFn
(initDelayMsecs int)
api/agent/agent_evict_test.go:77
↓ 14 callers
Function
setEnvUint
(err error, name string, dst *uint64, defaultValue *uint64)
api/agent/config.go:253
↓ 12 callers
Method
AddSession
AddSession manipulates the session counter by adding the delta value. Incrementing the session counter is not possible and will set return value to fa
api/common/wait_utils.go:70
↓ 12 callers
Method
InsertTrigger
InsertTrigger inserts a trigger. Returns ErrDatastoreEmptyTrigger when trigger is nil, and specific errors for each field Returns ErrTriggerAlreadyExi
api/models/datastore.go:56
↓ 12 callers
Method
UpdateApp
UpdateApp updates an App's Config. Returns ErrDatastoreEmptyApp when app is nil, and ErrDatastoreEmptyAppName when app.Name is empty. Returns ErrAppsN
api/models/datastore.go:30
↓ 12 callers
Method
Version
()
api/datastore/sql/migratex/migrate.go:56
↓ 12 callers
Function
WithConfig
WithConfig sets the agent config to the provided config
api/agent/agent.go:169
↓ 12 callers
Function
checkStr
(input string, expected MilliCPUs)
api/models/config_test.go:9
↓ 11 callers
Method
CreateCookie
Create a new cookie with defaults and/or settings from container task. Callers should Close the cookie regardless of whether they prepare or run it.
api/agent/drivers/driver.go:73
↓ 11 callers
Method
IsMaxCapacity
IsMaxCapacity returns true if total size of all images exceeds the limit and if there's an image in LRU cache that can be removed.
api/agent/drivers/docker/image_cache.go:37
↓ 11 callers
Method
PlaceCall
(ctx context.Context, rp RunnerPool, call RunnerCall)
api/runnerpool/runner_pool.go:16
↓ 11 callers
Method
Start
Start will be called before this call is executed, it may be used to guarantee mutual exclusion, check docker permissions, update timestamps, etc. TOD
api/agent/call.go:31
↓ 11 callers
Method
Update
Update adds an image to the LRU cache if the image is not marked in-use
api/agent/drivers/docker/image_cache.go:47
↓ 11 callers
Method
With
With Creates a new annotations object containing the specified value - this does not perform size checks on the total number of keys this validates th
api/models/annotations.go:111
↓ 11 callers
Method
isEvicted
()
api/agent/evictor.go:61
↓ 10 callers
Method
CreateEvictToken
CreateEvictToken creates an eviction token to be used in evictor tracking. Returns an eviction token.
api/agent/evictor.go:36
↓ 10 callers
Method
GivenTriggerInDb
(validTrigger *models.Trigger)
api/datastore/datastoretest/test.go:144
next →
1–100 of 2,053, ranked by callers