wisski-cloud-distillery/internal/component/server.go
2022-10-04 11:36:45 +02:00

18 lines
373 B
Go

package component
import (
"net/http"
"github.com/tkw1536/goprogram/stream"
)
// Servable implements a component with a Serve method
type Servable interface {
Component
// Routes returns the routes served by this servable
Routes() []string
// Handler returns the handler for the requested route
Handler(route string, io stream.IOStream) (http.Handler, error)
}