server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0, MIT Imports: 18 Imported by: 0

Documentation

Overview

Package server is the proxy core: a data-plane listener that runs the negotiate → decode → one upstream call → encode pipeline, and an ops listener for /metrics, /health, /ready. The bundle is held behind an atomic.Pointer (set once at boot in v0.1; the v0.3 SIGHUP-swap hook point).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func New

func New(cfg *config.Config) *Server

func (*Server) Bundle

func (s *Server) Bundle() *bundle.Bundle

func (*Server) DataHandler

func (s *Server) DataHandler() http.Handler

func (*Server) Message

func (s *Server) Message(fullName string) (protoreflect.MessageDescriptor, error)

Message implements adapter.MessageResolver against the current bundle.

func (*Server) OpsHandler

func (s *Server) OpsHandler() http.Handler

OpsHandler serves the ops surface: Prometheus /metrics, liveness/readiness probes (/health, /ready), and pprof. It is intentionally bound to the ops listener (WAVEFRONT_METRICS_ADDR) only — pprof must never be reachable on the data plane, and is registered explicitly on this mux, not the global DefaultServeMux.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts both listeners and shuts them down gracefully when ctx is done.

func (*Server) SetBundle

func (s *Server) SetBundle(b *bundle.Bundle)

SetBundle installs the bundle and marks the proxy ready. v0.1 calls this once at boot; the atomic pointer is the v0.3 hot-swap hook point.

Jump to

Keyboard shortcuts

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