mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Update deps; add container label for logs
This commit is contained in:
@@ -23,6 +23,7 @@ type Config struct {
|
||||
Payload string
|
||||
Timeout time.Duration
|
||||
RequestURL string
|
||||
AppName string
|
||||
}
|
||||
|
||||
type Runner struct {
|
||||
|
||||
@@ -24,6 +24,12 @@ func (t *containerTask) EnvVars() map[string]string {
|
||||
return env
|
||||
}
|
||||
|
||||
func (t *containerTask) Labels() map[string]string {
|
||||
return map[string]string{
|
||||
"LogName": t.cfg.AppName,
|
||||
}
|
||||
}
|
||||
|
||||
func (t *containerTask) Id() string { return t.cfg.ID }
|
||||
func (t *containerTask) Group() string { return "" }
|
||||
func (t *containerTask) Image() string { return t.cfg.Route.Image }
|
||||
|
||||
@@ -116,6 +116,7 @@ func handleRunner(c *gin.Context) {
|
||||
Timeout: 30 * time.Second,
|
||||
ID: reqID,
|
||||
RequestURL: c.Request.URL.String(),
|
||||
AppName: appName,
|
||||
})
|
||||
|
||||
if err := run.Run(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user