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

refactor: add service package and start splitting HTTP handling #1595

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Commits on Sep 5, 2024

  1. refactor: move util package tests to dedicated package

    Allow helpertest to use util since only the tests need helpertests, we
    can use util from there without creating a circular dependency.
    ThinkChaos committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    2674b45 View commit details
    Browse the repository at this point in the history
  2. refactor: add service package to prepare for split HTTP handling

    Package service exposes types to abstract services from the networking.
    
    The idea is that we build a set of services and a set of network
    endpoints (Listener). The services are then assigned to endpoints based
    on the address(es) they were configured for.
    
    Actual service to endpoint binding is not handled by the abstractions in
    this package as it is protocol specific.
    The general pattern is to make a "server" that wraps a service, and can
    then be started on an endpoint using a `Serve` method,
    similar to `http.Server`.
    
    To support exposing multiple compatible services on a single endpoint
    (example: DoH + metrics on a single port),
    services can implement `Merger`.
    ThinkChaos committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    192c4cf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5cf910a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bcb53fd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    15f5df7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    365e817 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    02da233 View commit details
    Browse the repository at this point in the history