8000 Agent alias by 0xada4d · Pull Request #16 · Ne0nd0g/merlin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Agent alias #16

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

Closed
wants to merge 6 commits into from
Closed

Agent alias #16

wants to merge 6 commits into from

Conversation

0xada4d
Copy link
@0xada4d 0xada4d commented Mar 17, 2018

Pull Request (PR) Checklist

  • I have read the CONTRIBUTING doc
  • PR is from a topic/feature/bugfix branch off the dev branch (right side)
  • PR is against the dev branch (left side)
  • Merlin compiles without errors
  • Passes linting checks and unit tests
  • Updated README documentation (if applicable)

Change Type

  • Addition
  • Bugfix
  • Modification
  • Removal
  • Security

Description

added support for agent alias - fixed #5

Copy link
Owner
@Ne0nd0g Ne0nd0g left a comment

Choose a reason for hiding this comment

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

Thank you for working on this feature request. I think that some of the code might be over complicated. I don't think there needs to be a global variables in the agents package. The zero value for Agent.Alias is the same as AliasNotSet, making it redundant. The SetAlias function takes in a slice, but I'm not sure why. I'm thinking there is no need for the SetAlias function? Could you elaborate on the intentions of the function?

Would the following sudo code work?

set alias
for every agent, check to see if is already in use
if not Agent.Alias =

I think all of this can take place in the cli package.

Would it be valuable to just set Agent.Alias to the string representation of its ID when it is instantiated and then update CLI to just use the alias instead of figuring out if it has an alias or not?

var paddingMax = 4096

type agent struct {
ID uuid.UUID
Alias string
Copy link
Owner

Choose a reason for hiding this comment

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

Fix spacing

@Ne0nd0g
Copy link
Owner
Ne0nd0g commented Mar 18, 2018

Would it make sense to make it a Agent.Name instead of Agent.Alias?

@@ -48,10 +48,15 @@ import (

// Agents contains all of the instantiated agent object that are accessed by other modules
var Agents = make(map[uuid.UUID]*agent)
// AgentAliasToID contains a mapping of each agent alias to its corresponding UUID
var AgentAliasToID = make(map[string] uuid.UUID)
Copy link
Owner

Choose a reason for hiding this comment

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

Does this need to be exported?

@Ne0nd0g
Copy link
Owner
Ne0nd0g commented Mar 18, 2018

Let's create an Agent log entry to record what the agent's alias was changed to.

@Ne0nd0g
Copy link
Owner
Ne0nd0g commented Feb 18, 2021

I've let this PR from 2018 go stale by not implementing it. The code has significantly changed. Going to close this.

@Ne0nd0g Ne0nd0g closed this Feb 18, 2021
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
0