Documentation
¶
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 StartPlatformAPIServer ¶
func StartPlatformAPIServer(cfg *config.Server, slogger *slog.Logger, internalPlugins []plugin.Plugin, externalPlugins []pdk.Plugin) (*Server, error)
StartPlatformAPIServer creates a new server instance with all dependencies initialized. It accepts extensions in two tiers:
- internalPlugins — in-tree modules (e.g. eventgateway) that receive the full plugin.Deps (raw repos, services, DB, event hub). Supplied by cmd/main.go via internal/builtins.Plugins().
- externalPlugins — external/wrapper modules that receive only the capabilities in pdk.Deps. Supplied by the platform façade from WithPlugin.
Both tiers run through one startup loop and are shut down the same way; they differ only in the Deps each receives.
func (*Server) Start ¶
Start brings up the enabled listeners. The plain-HTTP and TLS listeners are independent: either or both may run, each on its own port. This mirrors the gateway router's http/https listener split. At least one listener must be enabled.
timeouts bounds connection lifetime on both listeners so a slow or idle peer cannot hold one open indefinitely (Slowloris). It is validated at config load.