26 lines
359 B
Go
26 lines
359 B
Go
package contracts
|
|
|
|
import (
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type GRpcService interface {
|
|
Start() error
|
|
Stop() error
|
|
Restart() error
|
|
}
|
|
|
|
type GRpc interface {
|
|
Controller
|
|
// 获取 gRPC 服务的描述信息
|
|
GetGRpcServiceDesc() *grpc.ServiceDesc
|
|
}
|
|
|
|
type GRpcBase struct {
|
|
Controller
|
|
}
|
|
|
|
func (GRpcBase) GetGRpcServiceDesc() *grpc.ServiceDesc {
|
|
return nil
|
|
}
|