Merge pull request #55 from iron-io/log-label

Update deps; add container label for logs
This commit is contained in:
Travis Reeder
2016-08-15 21:07:09 -07:00
committed by GitHub
4 changed files with 10 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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 }

View File

@@ -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
View File

@@ -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: