You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
789 B
34 lines
789 B
package gateway |
|
|
|
import ( |
|
"context" |
|
"sig-pub/api/pb" |
|
|
|
"google.golang.org/grpc" |
|
) |
|
|
|
type GatewayPostalGrpcServer struct { |
|
pb.UnimplementedGatewayPostalServer |
|
} |
|
|
|
func NewGatewayGrpcServer() *GatewayPostalGrpcServer { |
|
return &GatewayPostalGrpcServer{} |
|
} |
|
|
|
// DeliverStream 使用流连续发送数据 |
|
func (svr *GatewayPostalGrpcServer) DeliverStream(req grpc.ClientStreamingServer[pb.ReqDeliver, pb.ResDeliver]) (err error) { |
|
|
|
return nil |
|
} |
|
|
|
// Deliver 发送一次数据 |
|
func (svr *GatewayPostalGrpcServer) Deliver(ctx context.Context, req *pb.ReqDeliver) (*pb.ResDeliver, error) { |
|
|
|
return nil, nil |
|
} |
|
|
|
// DeliverBatch 批量发送数据 |
|
func (svr *GatewayPostalGrpcServer) DeliverBatch(ctx context.Context, req *pb.ReqDeliverBatch) (res *pb.ResDeliver, err error) { |
|
|
|
return nil, nil |
|
}
|
|
|