# Functions
No description provided by the author
No description provided by the author
FromHTTPFnRequest Sets up a call from an http trigger request.
FromModel creates a call object from an existing stored call model object, reading the body from the stored call payload.
FromModelAndInput creates a call object from an existing stored call model object , reading the body from a provided stream.
No description provided by the author
InvokeDetached mark a call to be a detached call.
New creates an Agent that executes functions locally as Docker containers.
NewCachedDataAccess is a wrapper that caches entries temporarily.
No description provided by the author
NewConfig returns a config set from env vars, plus defaults.
No description provided by the author
No description provided by the author
NewDockerDriver creates a default docker driver from agent config.
No description provided by the author
No description provided by the author
No description provided by the author
NewLBAgent creates an Agent that knows how to load-balance function calls across a group of runner nodes.
NewMetricReadDataAccess adds metrics to a ReadDataAccess.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PureRunnerWithKdumpsOnDisk returns a PureRunnerOption that indicates that kdumps have been found on disk.
No description provided by the author
No description provided by the author
PureRunnerWithStatusImage returns a PureRunnerOption that annotates a PureRunner with a statusImageName attribute.
No description provided by the author
RegisterAgentViews creates and registers all agent views.
RegisterContainerViews creates and register containers views with provided tag keys.
RegisterDockerViews creates a and registers Docker views with provided tag keys.
No description provided by the author
RegisterRunnerViews creates and registers all runner views.
TranslateGRPCStatusToRunnerStatus runner.RunnerStatus to runnerpool.RunnerStatus.
WithCallOptions adds additional call options to each call created from GetCall, these options will be executed after any other options supplied to GetCall.
WithCallOverrider registers register a CallOverrider to modify a Call and extensions on call construction.
WithConfig sets the agent config to the provided config.
WithContext overrides the context on the call.
WithDockerAuth configures a call to retrieve credentials for an image pull.
WithDockerDriver Provides a customer driver to agent.
WithExtensions adds internal attributes to the call that can be interpreted by extensions in the agent Pure runner can use this to pass an extension to the call.
WithLBAgentConfig sets the agent config to the provided Config.
WithLBCallOptions adds additional call options to each call created from GetCall, these options will be executed after any other options supplied to GetCall.
WithLBCallOverrider is for LB agents to register a CallOverrider to modify a Call and extensions.
WithLogger sets stderr to the provided one.
WithTrigger adds trigger specific bits to a call.
WithWriter sets the writer that the call uses to send its output message to TODO this should be required.
# Constants
running: busy.
exited/failed/done.
running: idle but not paused.
No description provided by the author
uninitialized.
running: idle but paused.
launching.
resource (cpu + mem) waiting.
No description provided by the author
DefaultHotPoll is the default value for EnvHotPoll.
Assume 2GB RAM on non-linux systems.
EnvContainerLabelTag is a classifier label tag that is used to distinguish fn managed containers.
EnvDetachedHeadroom is the extra room we want to give to a detached function to run.
EnvDisableDebugUserLogs disables user function logs being logged at level debug.
EnvDisableReadOnlyRootFs makes the root fs for a container have rw permissions, by default it is read only.
EnvDisableUnprivilegedContainers disables docker security features like user name, cap drop etc.
EnvDockerLoadFile is a file location for a file that contains a tarball of a docker image to load on startup.
EnvDockerNetworks is a comma separated list of networks to attach to each container started.
EnvEnableNBResourceTracker makes every request to the resource tracker non-blocking, meaning the resources are either available or it will return an error immediately.
EnvFreezeIdle is the delay between a container being last used and being frozen.
EnvHotLauncherTimeout is the timeout for a hot container queue to persist if idle.
EnvHotPoll is the interval to ping for a slot manager thread to check if a container should be launched for a given function.
EnvHotStartTimeout is the timeout for a hot container to be created including docker-pull.
EnvHotStartTimeout is the timeout for a hot container to become available for use for requests after EnvHotStartTimeout.
EnvImageCleanExemptTags list of image names separated by whitespace that are exempt from removal in image cleaner.
EnvImageCleanMaxSize enables image cleaner and sets the high water mark for image cache in bytes.
EnvImageEnableVolume allows image to contain VOLUME definitions.
EnvIOFSDockerPath determines the relative location on the docker host where iofs mounts should be prefixed with.
EnvIOFSEnableTmpfs enables creating a per-container tmpfs mount for the IOFS.
EnvIOFSOpts are the options to set when mounting the iofs directory for unix socket files.
EnvIOFSPath is the path within fn server container of a directory to configure for unix socket files for each container.
EnvMaxFsSize is the maximum filesystem size that a function may use.
EnvHdrMaxResponseSize is the maximum number of bytes that a function may return in an invocation header.
EnvMaxLockedMemory the maximum number of bytes of memory that may be locked into RAM.
EnvMaxLogSize is the maximum size that a function's log may reach.
EnvMaxMessageQueue limit on the number of bytes that can be allocated for POSIX message queues.
EnvMaxOpenFiles is the maximum number open files handles the process in a function is allowed to have.
EnvMaxPendingSignals limit on the number of signals that may be queued.
EnvMaxPIDs is the maximum number of PIDs that a function is allowed to create.
EnvMaxResponseSize is the maximum number of bytes that a function may return from an invocation.
EnvMaxTmpFsInodes is the maximum number of inodes for /tmp in a container.
EnvMaxTotalCPU is the maximum CPU that will be reserved across all containers.
EnvMaxTotalMemory is the maximum memory that will be reserved across all containers.
EnvPreForkCmd is the command to run for images in the pre-fork pool, it should run for a long time.
EnvPreForkImage is the image to use for the pre-fork pool.
EnvPreForkNetworks is the equivalent of EnvDockerNetworks but for pre-fork pool containers.
EnvPreForkPoolSize is the number of containers pooled to steal network from, this may reduce latency.
EnvPreForkUseOnce limits the number of times a pre-fork pool container may be used to one, they are otherwise recycled.
max buffer size for grpc data messages, 10K.
MaxMsDisabled is used to determine whether mr freeze is lying in wait.
No description provided by the author
No description provided by the author
RegistryToken is a reserved call extensions key to pass registry token #nosec */.
request is done.
request is executing.
No description provided by the author
uninitialized.
request is waiting.
No description provided by the author
No description provided by the author
Here we give 5 seconds of timeout inside the container.
Total context timeout (scheduler+execution.) We need to allocate plenty of time here.
# Variables
AppIDMetricKey is a tag for metrics.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FnIDMetricKey is a tag for metrics.
ImageNameMetricKey is a tag for metrics.
# Structs
Config specifies various settings for an agent.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
Agent exposes an api to create calls from various parameters and then submit those calls, it also exposes a 'safe' shutdown mechanism via its Close method.
Call is an agent specific instance of a call object, that is runnable.
No description provided by the author
XXX(reed): replace all uses of ReadDataAccess with DataAccess or vice versa, whatever is easier.
No description provided by the author
Log Streamer to manage log gRPC interface.
ReadDataAccess represents read operations required to operate a load balancer node.
No description provided by the author
No description provided by the author
A simple resource (memory, cpu, disk, etc.) tracker for scheduling.
No description provided by the author
# Type aliases
CallOpt allows configuring a call before execution TODO(reed): consider the interface here, all options must be defined in agent and flexible enough for usage by extenders of fn, this straddling is painful.
CallOverrider should die.
No description provided by the author
No description provided by the author
Option configures an agent at startup.
No description provided by the author
No description provided by the author