contracts/grpc.go

26 lines
359 B
Go
Raw Permalink Normal View History

2023-05-16 14:45:14 +08:00
package contracts
2023-06-05 13:37:32 +08:00
import (
"google.golang.org/grpc"
)
2023-06-06 10:14:16 +08:00
type GRpcService interface {
2023-05-16 14:45:14 +08:00
Start() error
Stop() error
Restart() error
}
2023-06-05 13:37:32 +08:00
2023-06-05 16:52:03 +08:00
type GRpc interface {
Controller
// 获取 gRPC 服务的描述信息
GetGRpcServiceDesc() *grpc.ServiceDesc
}
type GRpcBase struct {
Controller
}
func (GRpcBase) GetGRpcServiceDesc() *grpc.ServiceDesc {
return nil
2023-06-05 13:37:32 +08:00
}