server

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package server holds the HTTP handlers for the client edge and the internal-listener.

Client edge (8443): GET /{bucket}/{key} (with optional Range), HEAD, LIST. No auth in dev (server.auth.enabled=false).

Internal listener (8444): GET /internal/fill?<chunk-key>. No mTLS in dev (cluster.internal_tls.enabled=false).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EdgeHandler

type EdgeHandler struct {
	// contains filtered or unexported fields
}

EdgeHandler implements the client-edge S3 surface.

func NewEdgeHandler

func NewEdgeHandler(fc edgeFetchAPI, cfg *config.Config, log *slog.Logger) *EdgeHandler

NewEdgeHandler wires the edge handler.

func (*EdgeHandler) ServeHTTP

func (h *EdgeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes incoming client requests.

Routing (path-style only, since LocalStack and most dev clients use path-style):

GET  /                                  -> ListBuckets (not supported; 405)
GET  /{bucket}/?list-type=2&prefix=...  -> ListObjectsV2
GET  /{bucket}/                         -> ListObjectsV2 (default)
GET  /{bucket}/{key}                    -> GetObject (with optional Range)
HEAD /{bucket}/{key}                    -> HeadObject
HEAD /{bucket}/                         -> HeadBucket (not supported; 405)

type InternalHandler

type InternalHandler struct {
	// contains filtered or unexported fields
}

InternalHandler implements GET /internal/fill on the internal listener. Plain HTTP/2 (no mTLS) in dev.

func NewInternalHandler

func NewInternalHandler(fc internalFetchAPI, cl *cluster.Cluster, log *slog.Logger) *InternalHandler

NewInternalHandler wires the internal handler.

func (*InternalHandler) ServeHTTP

func (h *InternalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles GET /internal/fill?<chunk-key-params>.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL