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

Handle context in plugins #361

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

Handle context in plugins #361

wants to merge 19 commits into from

Conversation

balanza
Copy link
Member

@balanza balanza commented Dec 31, 2024

Description

Enhance the work from #360 to handle Context in plugins, too.

The problem

The context cannot be passed to a plugged gatherer just like to a built-in gatherer, as the communication is network-based and the plugin is a different binary.

The idea

  • The client part receives a context that will be used for intercepting cancellations and asks the server to stop the process
  • The server part exposes a Cancel function that the client can invoke
  • Each request is identified by a UUID and the server part holds a map of cancel functions

Depends on #360

@balanza balanza force-pushed the handle-context-in-plugin branch 4 times, most recently from b7f99d5 to c93134f Compare January 2, 2025 12:00
@balanza balanza force-pushed the discovery-context-propagation branch from fdb151c to 102fc2d Compare January 3, 2025 09:56
@balanza balanza force-pushed the handle-context-in-plugin branch 5 times, most recently from 2fb3a5f to 9d7e56a Compare January 8, 2025 20:46
@balanza balanza force-pushed the discovery-context-propagation branch from 985b4ec to 4243bf3 Compare January 8, 2025 21:30
@balanza balanza force-pushed the handle-context-in-plugin branch from 9d7e56a to ab1fbb5 Compare January 8, 2025 21:31
Copy link
Contributor

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

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

Good stuff

}

type GatheringArgs struct {
Facts []entities.FactRequest
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: I would rename this to FactRequests

@arbulu89 arbulu89 added the enhancement New feature or request label Jan 9, 2025
@balanza balanza force-pushed the handle-context-in-plugin branch from ab1fbb5 to 55b9000 Compare January 9, 2025 12:10
Copy link

dpulls bot commented Jan 10, 2025

🎉 All dependencies have been resolved !

Base automatically changed from discovery-context-propagation to main January 10, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants