Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Implement fleetctl goquery #2186

Merged
merged 4 commits into from
Jan 24, 2020
Merged

Implement fleetctl goquery #2186

merged 4 commits into from
Jan 24, 2020

Conversation

zwass
Copy link
Contributor

@zwass zwass commented Jan 17, 2020

  • Update fleet APIs to support necessary operations in goquery
  • Implement support for goquery in fleetctl

Copy link
Contributor

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Not sure I love the implementation, but I don't see any major issues with it. So I'm +1 on it. Can always iterate later.

client *service.Client
queryCounter int
queries map[string]activeQuery
// goquery passes the UUID, while we need the hostname (or ID) to
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if this is totally right? goquery passes whatever you handed it. So you could hand it a hostname+query id parameter, and it'll pass them back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As of now goquery uses the UUID of the returned host object to refer to the host later. I discussed with those folks the possibility of goquery using the original identifier, but that has not yet been implemented.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it's reused. But, IIRC, it can be whatever you want it to be. A ulid is just a string

@zwass zwass merged commit 6dbc3bc into kolide:master Jan 24, 2020
@zwass zwass deleted the fleetctl-goquery branch January 24, 2020 05:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants