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
↓ 1 callers
Function
clampUint64
(val, min, max uint64)
api/agent/resource.go:265
↓ 1 callers
Function
cloneHeaders
(src http.Header)
api/agent/runner_client.go:352
↓ 1 callers
Method
collectStats
Repeatedly collect stats from the specified docker container until the stopSignal is closed or the context is cancelled
api/agent/drivers/docker/docker.go:500
↓ 1 callers
Method
configureCPU
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:238
↓ 1 callers
Method
configureCmd
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:327
↓ 1 callers
Method
configureEnv
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:338
↓ 1 callers
Method
configureFsSize
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:116
↓ 1 callers
Method
configureHostname
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:317
↓ 1 callers
Method
configureIOFS
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:190
↓ 1 callers
Method
configureImage
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:56
↓ 1 callers
Method
configureLabels
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:60
↓ 1 callers
Method
configureLocalDebugPortMapping
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:265
↓ 1 callers
Method
configureLogger
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:73
↓ 1 callers
Method
configureMem
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:101
↓ 1 callers
Method
configureNetwork
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:282
↓ 1 callers
Method
configurePIDs
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:131
↓ 1 callers
Method
configureSecurity
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:352
↓ 1 callers
Method
configureTmpFs
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:166
↓ 1 callers
Method
configureULimits
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:142
↓ 1 callers
Method
configureVolumes
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:219
↓ 1 callers
Method
configureWorkDir
(log logrus.FieldLogger)
api/agent/drivers/docker/cookie.go:255
↓ 1 callers
Function
contextWithSignal
(ctx context.Context, signals ...os.Signal)
api/server/init.go:125
↓ 1 callers
Function
createFile
(name string, size int)
images/fn-test-utils/fn-test-utils.go:402
↓ 1 callers
Function
createImageCache
createImageCache scans the driver config to spawn an image cacher if applicable
api/agent/drivers/docker/docker.go:134
↓ 1 callers
Function
createUDSRequest
(ctx context.Context, call *call)
api/agent/agent.go:628
↓ 1 callers
Function
debugH
TODO: I will remove this and other debug commented lines once I'm sure it's all right.
api/server/middleware.go:75
↓ 1 callers
Method
decrCalls
()
api/agent/lb_agent_test.go:64
↓ 1 callers
Method
defaultRunnerPool
()
api/server/server.go:392
↓ 1 callers
Method
deleteSlotQueue
currently unused. But at some point, we need to age/delete old slotQueues.
api/agent/slots.go:285
↓ 1 callers
Function
dial
uses grpc connection backoff protocol https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md
grpcutil/dial.go:23
↓ 1 callers
Method
dispatch
(ctx context.Context, call *call)
api/agent/agent.go:658
↓ 1 callers
Function
dockerMsg
removes docker err formatting: 'API Error (code) {"message":"..."}'
api/agent/drivers/docker/image_puller.go:174
↓ 1 callers
Function
downloadMetrics
()
test/fn-system-tests/system_test.go:163
↓ 1 callers
Method
endStateTrackers
(ctx context.Context, call *call)
api/agent/agent.go:280
↓ 1 callers
Function
ensureVersionTable
(ctx context.Context, tx *sqlx.Tx)
api/datastore/sql/migratex/migrate.go:337
↓ 1 callers
Method
enterContainerState
(conType ContainerStateType)
api/agent/slots.go:238
↓ 1 callers
Method
enterRequestState
(reqType RequestStateType)
api/agent/slots.go:222
↓ 1 callers
Method
exec
(ctx context.Context, call *call)
api/agent/slots.go:22
↓ 1 callers
Method
exitContainerState
(conType ContainerStateType)
api/agent/slots.go:246
↓ 1 callers
Method
exitRequestState
(reqType RequestStateType)
api/agent/slots.go:230
↓ 1 callers
Function
extractFields
(c *gin.Context)
api/server/server.go:828
↓ 1 callers
Method
finalize
finalize initiates a graceful shutdown of the session. This is currently achieved by a sentinel nil enqueue to gRPC sender.
api/agent/pure_runner.go:147
↓ 1 callers
Method
finalizeAttempts
(isCommited bool)
api/runnerpool/placer_stats.go:45
↓ 1 callers
Function
finalizeRequest
(out io.Writer, req *AppRequest, resp *AppResponse)
images/fn-test-utils/fn-test-utils.go:133
↓ 1 callers
Method
fireAfterCall
(context.Context, *models.Call)
api/agent/listeners.go:12
↓ 1 callers
Method
fireBeforeCall
(context.Context, *models.Call)
api/agent/listeners.go:11
↓ 1 callers
Function
fnCacheKey
(fnID string)
api/agent/data_access.go:81
↓ 1 callers
Function
generateRandUUID
()
api/agent/drivers/docker/docker.go:654
↓ 1 callers
Function
getAPIURL
()
test/fn-system-tests/exec_http_trigger_test.go:358
↓ 1 callers
Method
getAuthToken
()
api/agent/slots.go:260
↓ 1 callers
Function
getCallOptions
(req *http.Request, app *models.App, fn *models.Fn, trig *models.Trigger, rw http.ResponseWriter)
api/server/runner_fninvoke.go:139
↓ 1 callers
Method
getDataMsg
getDataMsg fetches/waits for a DataFrame message from the LB using inQueue (gRPC receiver)
api/agent/pure_runner.go:580
↓ 1 callers
Function
getDockerInfo
()
images/fn-test-utils/fn-test-utils.go:440
↓ 1 callers
Function
getHungDocker
()
api/agent/agent_evict_test.go:53
↓ 1 callers
Function
getMemoryHeadRoom
headroom estimation in order not to consume entire RAM if possible
api/agent/resource.go:387
↓ 1 callers
Function
getMonitoredCmdNames
determine sidecar-monitored cmd names. But by default we track dockerd + containerd
api/server/server.go:746
↓ 1 callers
Function
getPidCmd
TODO plumbing considerations, we've put the S pipe next to the chandalier...
api/server/server.go:759
↓ 1 callers
Function
getPidList
()
api/server/server.go:806
↓ 1 callers
Method
getSlot
getSlot returns a Slot (or error) for the request to run. This will wait for other containers to become idle or it may wait for resources to become av
api/agent/agent.go:355
↓ 1 callers
Method
getSlotQueue
getSlot must ensure that if it receives a slot, it will be returned, otherwise a container will be locked up forever waiting for slot to free.
api/agent/slots.go:270
↓ 1 callers
Function
getTotalLeaks
()
images/fn-test-utils/fn-test-utils.go:107
↓ 1 callers
Method
getTryMsg
getTryMsg fetches/waits for a TryCall message from the LB using inQueue (gRPC receiver)
api/agent/pure_runner.go:557
↓ 1 callers
Method
handleFnInvokeCall2
handleTriggerHTTPFunctionCall2 executes the function and returns an error Requires the following in the context:
api/server/runner_fninvoke.go:59
↓ 1 callers
Method
handleShutdown
(halt context.CancelFunc)
api/server/shutdown.go:10
↓ 1 callers
Method
handleStatusCall
Handles a status call concurrency and caching.
api/agent/runner_status.go:110
↓ 1 callers
Method
handleTriggerHTTPFunctionCall2
handleTriggerHTTPFunctionCall2 executes the function and returns an error Requires the following in the context:
api/server/runner_httptrigger.go:26
↓ 1 callers
Method
handleTryCall
handleTryCall based on the TryCall message, tries to place the call on NBIO Agent
api/agent/pure_runner.go:693
↓ 1 callers
Method
hotLauncher
hotLauncher is spawned in a go routine for each slot queue to monitor stats and launch hot containers if needed. Upon shutdown or activity timeout, ho
api/agent/agent.go:401
↓ 1 callers
Function
initContainerGaugeMeasures
()
api/agent/stats.go:379
↓ 1 callers
Function
initContainerTimeMeasures
()
api/agent/stats.go:390
↓ 1 callers
Function
initDockerMeasures
initDockerMeasures initializes Docker related measures
api/agent/stats.go:365
↓ 1 callers
Method
initializeCPU
(cfg *Config)
api/agent/resource.go:271
↓ 1 callers
Method
initializeMemory
(cfg *Config)
api/agent/resource.go:329
↓ 1 callers
Function
inotifyAwait
(ctx context.Context, iofsDir string, udsWait chan error)
api/agent/agent.go:1009
↓ 1 callers
Function
installChildReaper
Installs a child process reaper if init process
api/server/init.go:147
↓ 1 callers
Function
isGRPCError
isGRPCError inspect the error to verify if it is gRPC status and return a bool as results of this operation true means the error is a gRPC error false
api/server/error_response.go:77
↓ 1 callers
Function
isIdleState
(state ContainerStateType)
api/agent/state_trackers.go:119
↓ 1 callers
Function
isNet
(err error)
api/common/errors.go:18
↓ 1 callers
Method
isResourceAvailableLocked
(memory uint64, cpuQuota models.MilliCPUs)
api/agent/resource.go:120
↓ 1 callers
Function
isSyslogError
isSyslogError checks if the error message is what docker syslog plugin returns when not able to connect to syslog
api/agent/drivers/docker/docker.go:474
↓ 1 callers
Function
isTooBusy
isTooBusy checks if the error is a retriable error (503) that is explicitly sent by runner. If isTooBusy returns true then we can idempotently run thi
api/agent/runner_client.go:106
↓ 1 callers
Function
jumpConsistentHash
A Fast, Minimal Memory, Consistent Hash Algorithm: https://arxiv.org/ftp/arxiv/papers/1406/1406.2294.pdf
api/runnerpool/ch_placer.go:78
↓ 1 callers
Function
killLeakedContainers
killLeakedContainers scans and destroys previously left over containers that were managed by this docker driver. This operation is executed once and i
api/agent/drivers/docker/docker.go:152
↓ 1 callers
Function
latestVersion
latest version will find the latest version from a list of migration names (not from the db)
api/datastore/sql/sql.go:261
↓ 1 callers
Function
limitRequestBody
(max int64)
api/server/server_options.go:61
↓ 1 callers
Method
listenEventLoop
listenEventLoop listens for docker events and reconnects if necessary
api/agent/drivers/docker/docker_client.go:112
↓ 1 callers
Method
listenEvents
listenEvents registers an event listener to docker to stream docker events and records these in stats.
api/agent/drivers/docker/docker_client.go:124
↓ 1 callers
Function
loadDockerImages
(ctx context.Context, driver *DockerDriver)
api/agent/drivers/docker/docker.go:309
↓ 1 callers
Function
lock
(ctx context.Context, tx *sqlx.Tx)
api/datastore/sql/migratex/migrate.go:223
↓ 1 callers
Function
logCallFinish
(log logrus.FieldLogger, msg *pb.RunnerMsg_Finished, headers http.Header, httpStatus int32)
api/agent/runner_client.go:483
↓ 1 callers
Function
makeKeys
(names []string)
api/common/stats_utils.go:39
↓ 1 callers
Function
maxUint64
(a, b uint64)
api/agent/resource.go:258
↓ 1 callers
Function
migrateErr
(version int64, up bool, err error)
api/datastore/sql/migratex/migrate.go:26
↓ 1 callers
Method
nannyContainer
(ctx context.Context, driver *DockerDriver, task *poolTask, pullGate chan struct{})
api/agent/drivers/docker/docker_pool.go:304
↓ 1 callers
Function
newAttemptTracker
(ctx context.Context)
api/runnerpool/placer_stats.go:38
↓ 1 callers
Function
newClient
TODO: switch to github.com/docker/engine-api
api/agent/drivers/docker/docker_client.go:51
↓ 1 callers
Function
newLimitWriter
(max int, w io.Writer)
api/agent/func_logger.go:185
↓ 1 callers
Function
newMockRunnerPool
(sleep time.Duration, maxCalls int32, runnerAddrs []string)
api/agent/lb_agent_test.go:30
↓ 1 callers
Function
newSizerRespWriter
(max uint64, rw http.ResponseWriter)
api/agent/agent.go:764
↓ 1 callers
Method
newStatusCall
(payload json.RawMessage)
api/agent/runner_status.go:312
← previous
next →
701–800 of 2,053, ranked by callers