Skip to content

Commit

Permalink
Add TODO for worker log slice
Browse files Browse the repository at this point in the history
  • Loading branch information
htfy96 authored and 北涯 committed Aug 26, 2016
1 parent 7219619 commit 1e07fec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"io/ioutil"
"net/http"

log "github.com/Sirupsen/logrus"
"github.com/bshuster-repo/logrus-logstash-hook"
Expand Down
5 changes: 5 additions & 0 deletions worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ type Status struct {
// Idle stands for whether worker is idle, false if syncing
Idle bool
// Stdout records outputs to stdout of each command execution
// TODO: This slice may grow quite large as time goes by
// Candidate solutions:
// - use compression method like gzip/zlib [logs tend to have high compression rate, but just workaround]
// - keep max-length and remove exceeded items [frequent memory operation, stop-the-world GC]
// Anyway, a new type needs to be implemented/imported with Put(string) and GetAll() []string method
Stdout []string
// Stderr records outputs to stderr of each command execution
Stderr []string
Expand Down

0 comments on commit 1e07fec

Please sign in to comment.