-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds tests and uses filterName
instead.
#85
Conversation
Pulling in Source
### Building | ||
To Build and test locally: | ||
|
||
1. Install NodeJs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also cleaned this up.
ContainerLogs(context.Context, string, int) (<-chan string, <-chan error) | ||
Events(context.Context) (<-chan events.Message, <-chan error) | ||
} | ||
|
||
// NewClient creates a new instance of Client | ||
func NewClient() Client { | ||
func NewClient(filter string) Client { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this so that it always filters regardless of callers.
@@ -39,6 +40,7 @@ func init() { | |||
pflag.String("base", "/", "base address of the application to mount") | |||
pflag.String("level", "info", "logging level") | |||
pflag.Int("tailSize", 300, "Tail size to use for initial container logs") | |||
pflag.String("filterName", "", "Filters containers by name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used filterName
instead to be similar to docker manual
All tests pass. Going to merge. |
@adamzero1 I moved some tests around. I also fixed some of the code so that the logic for finding the right container is push back to the
docker.Client