wisski-cloud-distillery/internal/dis/component/server.go
2022-11-30 13:17:12 +01:00

18 lines
360 B
Go

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