Documentation
¶
Index ¶
- Constants
- func EnforceRuntimePolicy(goos string, logger *log.Logger) error
- func ListenUnixSocket(path string) (net.Listener, error)
- func MetricsHandler(pool *herd.Pool[*http.Client]) http.Handler
- func NewDataPlaneHandler(pool *herd.Pool[*http.Client], metricsPath string) http.Handler
- func RecordAcquireFailure()
- func RecordAcquireRequest()
- func RecordSessionKilled()
- func RecordSessionStarted()
- func RemoveUnixSocket(path string) error
- type EventLogger
- type LifecycleSnapshot
- type Server
Constants ¶
const SessionHeader = "X-Session-ID"
Variables ¶
This section is empty.
Functions ¶
func EnforceRuntimePolicy ¶
EnforceRuntimePolicy validates platform support and emits guarantee warnings. Linux runs with full guarantees. macOS is supported in reduced-guarantee mode. Other operating systems fail fast at startup.
func ListenUnixSocket ¶
ListenUnixSocket creates a UDS listener for the control plane. It removes stale socket files before binding and applies owner-only perms.
func MetricsHandler ¶
MetricsHandler exposes a small Prometheus-compatible text endpoint.
func NewDataPlaneHandler ¶
NewDataPlaneHandler builds the HTTP data-plane mux. - Proxy traffic is routed by X-Session-ID to session-affine workers. - /healthz reports daemon liveness. - telemetry metrics are exposed at metricsPath.
func RecordAcquireFailure ¶
func RecordAcquireFailure()
func RecordAcquireRequest ¶
func RecordAcquireRequest()
func RecordSessionKilled ¶
func RecordSessionKilled()
func RecordSessionStarted ¶
func RecordSessionStarted()
func RemoveUnixSocket ¶
RemoveUnixSocket removes a control-plane UDS file if it exists.
Types ¶
type EventLogger ¶
type EventLogger struct {
// contains filtered or unexported fields
}
func NewEventLogger ¶
func NewEventLogger(format string, logger *log.Logger) *EventLogger
type LifecycleSnapshot ¶
type LifecycleSnapshot struct {
AcquireRequests uint64
AcquireFailures uint64
SessionsStarted uint64
SessionsKilled uint64
}
func SnapshotLifecycleCounters ¶
func SnapshotLifecycleCounters() LifecycleSnapshot
type Server ¶
type Server struct {
pb.UnimplementedHerdServiceServer
// contains filtered or unexported fields
}
Server implements the HerdService gRPC server.