forked from mtusi2026/mtusi2026lab3
13 lines
407 B
Go
13 lines
407 B
Go
// Package controller connects transport lifecycles to Fx.
|
|
package controller
|
|
|
|
import "context"
|
|
|
|
// Controller is a process-owned transport server.
|
|
type Controller interface {
|
|
// Start acquires the listener and reports startup errors to the lifecycle owner.
|
|
Start(context.Context) error
|
|
// Stop stops accepting work and drains active requests within the supplied deadline.
|
|
Stop(context.Context) error
|
|
}
|