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) and HEAD /{bucket}/{key}. No auth in dev (server.auth.enabled=false). Errors are returned as S3-compatible XML <Error> envelopes so that AWS S3 SDKs surface a typed error code to the caller; HEAD errors carry status + headers only (no body), matching real S3 behavior.
Internal listener (8444): GET /internal/fill?<chunk-key>. No mTLS in dev (cluster.internal_tls.enabled=false). Internal-listener errors are plain text or JSON; the internal API is peer-to-peer between orca replicas and is never consumed by an S3 SDK.
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 the S3-compatible dev backend and most dev clients use path-style):
GET / -> ListBuckets (not supported; 501)
GET /{bucket}/ -> ListObjectsV2 (not supported; 501)
GET /{bucket}/{key} -> GetObject (with optional Range)
HEAD / -> (not supported; 501)
HEAD /{bucket}/ -> HeadBucket (not supported; 501)
HEAD /{bucket}/{key} -> HeadObject
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>.