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

add DialOption for adding a header #1

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

jscheithe
Copy link

@jscheithe jscheithe commented Jun 14, 2023

opening this PR just for discussing the changes, not intending to merge this.

Todo:

@jscheithe jscheithe requested a review from marton-cf June 14, 2023 11:48
@clushie
Copy link

clushie commented Jun 14, 2023

Awesome. Hope they'll accept the PR eventually. I guess we'd have to update docs and tests there as well. The devs of chromedp are very responsive fyi.

@@ -30,6 +31,8 @@ type Allocator interface {
// Cancelling the allocator context will already perform this operation,
// so normally there's no need to call Wait directly.
Wait()

getDialHeader() http.Header

Choose a reason for hiding this comment

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

Sure we need this private method in the Interface? This is usually for external use, internally we should have access to the real implementation ad not through the interface

@@ -583,6 +592,7 @@ func (a *RemoteAllocator) Allocate(ctx context.Context, opts ...BrowserOption) (
a.wg.Done()
}()

opts = append(opts, WithDialHeaderBrowser(FromContext(ctx).Allocator.getDialHeader()))

Choose a reason for hiding this comment

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

I see why we need it in the interface

@clushie clushie assigned clushie and flicaflow and unassigned clushie Aug 7, 2023
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.

3 participants