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

allow server input to middleware #39

Closed

Conversation

dezren39
Copy link
Contributor

@dezren39 dezren39 commented Mar 1, 2024

this allows to share the middleware.

something like

promSrv := promwish.NewServer("localhost:8080")

s, err := wish.NewServer(
  wish.WithMiddleware(
    promwish.MiddlewarewithServer(promSrv, "my-app")
  )
)

promSrv.Shutdown(context.Background())

i will try to test later but this is untested atm.

@dezren39 dezren39 mentioned this pull request Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (server@2c341cc). Click here to learn what that means.

Files Patch % Lines
main.go 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             server      #39   +/-   ##
=========================================
  Coverage          ?   76.00%           
=========================================
  Files             ?        1           
  Lines             ?       75           
  Branches          ?        0           
=========================================
  Hits              ?       57           
  Misses            ?       15           
  Partials          ?        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dezren39 dezren39 closed this Mar 1, 2024
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.

1 participant