mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-30 02:41:25 +08:00
【更新】更新restful
This commit is contained in:
19
pkg/transport/transport.go
Normal file
19
pkg/transport/transport.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user