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

Use a channel to communicate enrollment IDs #37

Open
jessepeterson opened this issue Jul 17, 2023 · 0 comments
Open

Use a channel to communicate enrollment IDs #37

jessepeterson opened this issue Jul 17, 2023 · 0 comments
Labels

Comments

@jessepeterson
Copy link
Owner

We can avoid buffering a potentially very large slice of strings by instead returning a channel and letting the receiver deal with it how they will.

// RetrieveEnrollmentIDs retrieves MDM enrollment IDs from storage.
// In the case of sets and declarations the transitive associations
// are traversed to try and collect the IDs. When multiple slices
// are given they should be treated like a logical or (i.e. finding
// all enrollment IDs for any of the given slices).
// Warning: the results may be very large for e.g. sets (or, transitively,
// declarations) that are assigned to many enrollment IDs.
RetrieveEnrollmentIDs(ctx context.Context, declarations []string, sets []string, ids []string) ([]string, error)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant