Skip to content
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

Merged
merged 5 commits into from
Jul 22, 2019
Merged

Conversation

amir20
Copy link
Owner

@amir20 amir20 commented Jul 22, 2019

@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

adamzero1 and others added 5 commits July 22, 2019 11:09
- ability to restrict view to container by regex match on container name
- instructions for building/running locally
### Building
To Build and test locally:

1. Install NodeJs.
Copy link
Owner Author

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 {
Copy link
Owner Author

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")
Copy link
Owner Author

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

@amir20
Copy link
Owner Author

amir20 commented Jul 22, 2019

All tests pass. Going to merge.

@amir20 amir20 merged commit 6a44eba into master Jul 22, 2019
@amir20 amir20 deleted the zero1limited-master branch January 7, 2020 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants