Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Counters = []prometheus.CounterDefinition{
{
Name: functionExecutionsMetric,
Help: "Number of functions executed by the node.",
},
{
Name: functionOkMetric,
Help: "Number of functions successfully executed by the node.",
},
{
Name: functionErrMetric,
Help: "Number of functions executed by the node that resulted in an error.",
},
{
Name: functionCPUUserTimeMetric,
Help: "Total CPU user time this node spent executing functions in milliseconds.",
},
{
Name: functionCPUSysTimeMetric,
Help: "Total CPU sys time this node spent executing functions in milliseconds.",
},
}
View Source
var Summaries = []prometheus.SummaryDefinition{
{
Name: functionDurationMetric,
Help: "Total time this node spent executing functions - wall clock time in milliseconds.",
},
}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { WorkDir string // directory where files needed for the execution are stored RuntimeDir string // directory where the executable can be found ExecutableName string // name for the executable DriversRootPath string // where are cgi drivers stored FS afero.Fs // FS accessor Limiter Limiter // Resource limiter for executed processes Metrics *metrics.Metrics // Metrics handle }
Config represents the Executor configuration.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor provides the capabilities to run external applications.
type Option ¶
type Option func(*Config)
func WithExecutableName ¶
WithExecutableName sets the name of the executable that should be ran.
func WithLimiter ¶
WithLimiter sets the resource limiter called for each individual execution.
func WithMetrics ¶ added in v0.7.0
func WithMetrics(metrics *metrics.Metrics) Option
WithMetrics sets the metrics handler.
func WithRuntimeDir ¶
WithRuntimeDir sets the runtime directory for the executor.
func WithWorkDir ¶
WithWorkDir sets the workspace directory for the executor.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.