mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Merge pull request #55 from iron-io/log-label
Update deps; add container label for logs
This commit is contained in:
@@ -23,6 +23,7 @@ type Config struct {
|
|||||||
Payload string
|
Payload string
|
||||||
Timeout time.Duration
|
Timeout time.Duration
|
||||||
RequestURL string
|
RequestURL string
|
||||||
|
AppName string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Runner struct {
|
type Runner struct {
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ func (t *containerTask) EnvVars() map[string]string {
|
|||||||
return env
|
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) Id() string { return t.cfg.ID }
|
||||||
func (t *containerTask) Group() string { return "" }
|
func (t *containerTask) Group() string { return "" }
|
||||||
func (t *containerTask) Image() string { return t.cfg.Route.Image }
|
func (t *containerTask) Image() string { return t.cfg.Route.Image }
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ func handleRunner(c *gin.Context) {
|
|||||||
Timeout: 30 * time.Second,
|
Timeout: 30 * time.Second,
|
||||||
ID: reqID,
|
ID: reqID,
|
||||||
RequestURL: c.Request.URL.String(),
|
RequestURL: c.Request.URL.String(),
|
||||||
|
AppName: appName,
|
||||||
})
|
})
|
||||||
|
|
||||||
if err := run.Run(); err != nil {
|
if err := run.Run(); err != nil {
|
||||||
|
|||||||
4
glide.lock
generated
4
glide.lock
generated
@@ -1,5 +1,5 @@
|
|||||||
hash: 5ccf89905e13b7dc987cd203c1d7c1fddd32dcd776fe2e5f60d9f6f7b9908425
|
hash: 5ccf89905e13b7dc987cd203c1d7c1fddd32dcd776fe2e5f60d9f6f7b9908425
|
||||||
updated: 2016-08-07T13:44:07.250867774-04:00
|
updated: 2016-08-16T14:52:37.933227014+12:00
|
||||||
imports:
|
imports:
|
||||||
- name: github.com/amir/raidman
|
- name: github.com/amir/raidman
|
||||||
version: c74861fe6a7bb8ede0a010ce4485bdbb4fc4c985
|
version: c74861fe6a7bb8ede0a010ce4485bdbb4fc4c985
|
||||||
@@ -100,7 +100,7 @@ imports:
|
|||||||
subpackages:
|
subpackages:
|
||||||
- registry
|
- registry
|
||||||
- name: github.com/iron-io/titan
|
- name: github.com/iron-io/titan
|
||||||
version: a55b68c6ff4c750886542e788b87db80dda7c47a
|
version: e309e9971583fd1b9894b250a28cb194d90e8ac5
|
||||||
repo: https://github.com/iron-io/titan.git
|
repo: https://github.com/iron-io/titan.git
|
||||||
vcs: git
|
vcs: git
|
||||||
subpackages:
|
subpackages:
|
||||||
|
|||||||
Reference in New Issue
Block a user