wisski-cloud-distillery/internal/dis/component/server.go
2023-01-06 18:59:06 +01:00

17 lines
344 B
Go

package component
import (
"context"
"net/http"
)
// Routeable is a component that is servable
type Routeable interface {
Component
// Routes returns the routes served by this servable
Routes() []string
// HandleRoute returns the handler for the requested route
HandleRoute(ctx context.Context, route string) (http.Handler, error)
}