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

Refactor for TLS handlers #54

Merged
merged 3 commits into from
Mar 26, 2020
Merged

Refactor for TLS handlers #54

merged 3 commits into from
Mar 26, 2020

Conversation

javuto
Copy link
Collaborator

@javuto javuto commented Mar 24, 2020

Overview

  • Refactor for HTTP handlers, that will allow easier testing.

@javuto javuto added refactor Refactorization of code osctrl-tls osctrl-tls related changes labels Mar 24, 2020
@javuto javuto added this to the v0.2.2 milestone Mar 24, 2020
@javuto javuto self-assigned this Mar 24, 2020
@javuto javuto merged commit cb8ff04 into master Mar 26, 2020
@@ -416,6 +414,9 @@ func main() {
}
}()

// multiple listeners channel
finish := make(chan bool)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm I had this from a long time ago when I was running all services in the same binary, but now I am not using it anymore. Remove!

Comment on lines +22 to +27
l.Log(
logType,
data,
environment,
uuid,
debug)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, funny line splitting.

Comment on lines +30 to +31
err := l.Nodes.RefreshLastStatus(uuid)
if err != nil {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if err := l.Nodes.RefreshLastStatus(uuid); err != nil {
}

Comment on lines +58 to +65
l.QueryLog(
types.QueryLog,
data,
node.Environment,
node.UUID,
queryData.Name,
queryData.Status,
debug)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same odd line-splitting comment.

Comment on lines +15 to +16
err := json.Unmarshal(data, &logs)
if err != nil {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if err := ...; err != nil {
}

result := []string{}
for _, entry := range duplicated {
if _, value := keys[entry]; !value {
keys[entry] = true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think you actually need this. you don't use it anywhere.

@javuto javuto deleted the test-handlers-tls branch March 28, 2020 01:05
CptOfEvilMinions added a commit that referenced this pull request Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osctrl-tls osctrl-tls related changes refactor Refactorization of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants