legacy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package legacy is a listener hello serves itself, outside the SDK's public port: the service announces it with a declarative route (svc.API(api.HTTP(...))) so its API appears in the catalog.

Index

Constants

View Source
const Prefix = "/legacy/"

Prefix is what the legacy listener serves.

Variables

View Source
var API []byte

API describes the response served by this listener.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Listen address. Keep its port stable across restarts and replicas:
	// declarative routes are part of the immutable per-version manifest.
	Listen string `json:"listen" schemapb:"default=:8083"`
}

Config of the listener.

type Server

type Server struct {
	deps.Component
	// contains filtered or unexported fields
}

Server is a component owning its own listener, open from New so that the route can name its port before Run.

func New

func New(parent deps.Scope, cfg *Config) (*Server, error)

New listens on cfg.Listen and serves from the start of the tree to its stop.

func (*Server) Port

func (s *Server) Port() uint16

Port is the port the listener got.

Jump to

Keyboard shortcuts

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