mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
20 lines
248 B
Go
20 lines
248 B
Go
package transport
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Type string
|
|
|
|
const (
|
|
TypeHTTP Type = "HTTP"
|
|
TypeGRPC Type = "GRPC"
|
|
)
|
|
|
|
// Server is transport server.
|
|
type Server interface {
|
|
Type() Type
|
|
Start(context.Context) error
|
|
Stop(context.Context) error
|
|
}
|