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

Setup SourceUnit interface #1393

Merged
merged 7 commits into from
Jun 16, 2023
Merged

Setup SourceUnit interface #1393

merged 7 commits into from
Jun 16, 2023

Conversation

mcastorina
Copy link
Collaborator

This sets up the interfaces for sources to begin supporting enumeration/scanning with SourceUnits.

For example usage, see this commit.

@mcastorina mcastorina requested review from a team as code owners June 12, 2023 17:18
pkg/common/utils.go Outdated Show resolved Hide resolved
// SourceUnitUnmarshaller defines an optional interface a Source can implement
// to support units coming from an external source.
type SourceUnitUnmarshaller interface {
UnmarshalSourceUnit(data []byte) (SourceUnit, error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since these returned SourceUnit objects will be opaque to callers, how do they get used? Will they just be sent back to the source to either marshal or consume?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, most likely they'll be provided to the caller to be consumed. Marshalling can happen without the Source doing it for us.

It's an extra step the engine will have to take to scan units marshalled and stored in an external source.

Copy link
Collaborator

Choose a reason for hiding this comment

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

per huddle: they won't be completely opaque, because the source unit manager will be recording each source unit's id and using it to plan/report on things

@mcastorina mcastorina merged commit e12f0f8 into main Jun 16, 2023
@mcastorina mcastorina deleted the source-unit branch June 16, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants