internal/component => internal/dis/component
This commit is contained in:
parent
9443217441
commit
b5b1ce2340
123 changed files with 76 additions and 76 deletions
19
internal/dis/component/server.go
Normal file
19
internal/dis/component/server.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package component
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/tkw1536/goprogram/stream"
|
||||
)
|
||||
|
||||
// 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(route string, context context.Context, io stream.IOStream) (http.Handler, error)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue