Documentation ¶
Index ¶
- Variables
- func RunAsyncRunner(ctx context.Context, tasksrv string, tasks chan task.Request, rnr *Runner)
- func RunTask(tasks chan task.Request, ctx context.Context, cfg *task.Config) (drivers.RunResult, error)
- func StartWorkers(ctx context.Context, rnr *Runner, tasks <-chan task.Request)
- type DefaultFuncLogger
- type DefaultMetricLogger
- func (l *DefaultMetricLogger) Log(ctx context.Context, metric map[string]interface{})
- func (l *DefaultMetricLogger) LogCount(ctx context.Context, name string, value int)
- func (l *DefaultMetricLogger) LogGauge(ctx context.Context, name string, value int)
- func (l *DefaultMetricLogger) LogTime(ctx context.Context, name string, value time.Duration)
- type FuncLogger
- type Metric
- type MetricLogger
- type Runner
- type Stats
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RunAsyncRunner ¶
RunAsyncRunner pulls tasks off a queue and processes them
func RunTask ¶
func RunTask(tasks chan task.Request, ctx context.Context, cfg *task.Config) (drivers.RunResult, error)
RunTask helps sending a task.Request into the common concurrency stream. Refer to StartWorkers() to understand what this is about.
func StartWorkers ¶
StartWorkers operates the common concurrency stream, ie, it will process all IronFunctions tasks, either sync or async. In the process, it also dispatches the workload to either regular or hot functions.
Types ¶
type DefaultFuncLogger ¶
type DefaultFuncLogger struct { }
FuncLogger reads STDERR output from a container and outputs it in a parseable structured log format, see: https://github.com/iron-io/functions/issues/76
type DefaultMetricLogger ¶
type DefaultMetricLogger struct{}
func (*DefaultMetricLogger) Log ¶
func (l *DefaultMetricLogger) Log(ctx context.Context, metric map[string]interface{})
func (*DefaultMetricLogger) LogCount ¶
func (l *DefaultMetricLogger) LogCount(ctx context.Context, name string, value int)
type FuncLogger ¶
func NewFuncLogger ¶
func NewFuncLogger() FuncLogger
type MetricLogger ¶
type MetricLogger interface { Log(context.Context, map[string]interface{}) LogCount(context.Context, string, int) LogGauge(context.Context, string, int) LogTime(context.Context, string, time.Duration) }
func NewMetricLogger ¶
func NewMetricLogger() MetricLogger
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, flog FuncLogger, mlog MetricLogger) (*Runner, error)
func (Runner) EnsureImageExists ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.