Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RegionEndpoints = map[Region]string{ RegionEU: "sellingpartnerapi-eu.amazon.com", RegionNA: "sellingpartnerapi-na.amazon.com", RegionFE: "sellingpartnerapi-fe.amazon.com", }
RegionEndpoints maps each region to its Amazon SP-API hostname.
Functions ¶
func NewHealthHandler ¶
NewHealthHandler returns an HTTP handler that serves health/readiness endpoints on the dashboard port.
Types ¶
type HandlerFactory ¶
HandlerFactory creates an HTTP handler for a given region. Each region gets its own handler (with its own reverse proxy pointed at the correct Amazon endpoint).
type Region ¶
type Region string
Region identifies an Amazon SP-API regional endpoint.
func AllRegions ¶
func AllRegions() []Region
AllRegions returns all supported regions in deterministic order.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server manages multiple HTTP listeners: one per SP-API region + dashboard.
func New ¶
func New(cfg *config.Config, factory HandlerFactory, dashboardHandler http.Handler) (*Server, error)
New creates a new Server. factory creates the HTTP handler for each region. Pass nil for dashboard-only mode (all proxy ports serve 404).
func (*Server) DashboardAddr ¶
DashboardAddr returns the dashboard listen address, or "" if not started.
func (*Server) RegionAddr ¶
RegionAddr returns the listen address for a region, or "" if disabled.