✨ Push stream able to get which request success
⬆️ Upgrade protobuf version
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v5.28.2
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// source: services.proto
|
||||
|
||||
package proto
|
||||
@@ -15,8 +15,16 @@ import (
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
DirectoryService_GetService_FullMethodName = "/proto.DirectoryService/GetService"
|
||||
DirectoryService_ListService_FullMethodName = "/proto.DirectoryService/ListService"
|
||||
DirectoryService_AddService_FullMethodName = "/proto.DirectoryService/AddService"
|
||||
DirectoryService_RemoveService_FullMethodName = "/proto.DirectoryService/RemoveService"
|
||||
DirectoryService_BroadcastEvent_FullMethodName = "/proto.DirectoryService/BroadcastEvent"
|
||||
)
|
||||
|
||||
// DirectoryServiceClient is the client API for DirectoryService service.
|
||||
//
|
||||
@@ -38,8 +46,9 @@ func NewDirectoryServiceClient(cc grpc.ClientConnInterface) DirectoryServiceClie
|
||||
}
|
||||
|
||||
func (c *directoryServiceClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetServiceResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.DirectoryService/GetService", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, DirectoryService_GetService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -47,8 +56,9 @@ func (c *directoryServiceClient) GetService(ctx context.Context, in *GetServiceR
|
||||
}
|
||||
|
||||
func (c *directoryServiceClient) ListService(ctx context.Context, in *ListServiceRequest, opts ...grpc.CallOption) (*ListServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListServiceResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.DirectoryService/ListService", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, DirectoryService_ListService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -56,8 +66,9 @@ func (c *directoryServiceClient) ListService(ctx context.Context, in *ListServic
|
||||
}
|
||||
|
||||
func (c *directoryServiceClient) AddService(ctx context.Context, in *ServiceInfo, opts ...grpc.CallOption) (*AddServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AddServiceResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.DirectoryService/AddService", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, DirectoryService_AddService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -65,8 +76,9 @@ func (c *directoryServiceClient) AddService(ctx context.Context, in *ServiceInfo
|
||||
}
|
||||
|
||||
func (c *directoryServiceClient) RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RemoveServiceResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.DirectoryService/RemoveService", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, DirectoryService_RemoveService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -74,8 +86,9 @@ func (c *directoryServiceClient) RemoveService(ctx context.Context, in *RemoveSe
|
||||
}
|
||||
|
||||
func (c *directoryServiceClient) BroadcastEvent(ctx context.Context, in *EventInfo, opts ...grpc.CallOption) (*EventResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(EventResponse)
|
||||
err := c.cc.Invoke(ctx, "/proto.DirectoryService/BroadcastEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, DirectoryService_BroadcastEvent_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -84,7 +97,7 @@ func (c *directoryServiceClient) BroadcastEvent(ctx context.Context, in *EventIn
|
||||
|
||||
// DirectoryServiceServer is the server API for DirectoryService service.
|
||||
// All implementations must embed UnimplementedDirectoryServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type DirectoryServiceServer interface {
|
||||
GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error)
|
||||
ListService(context.Context, *ListServiceRequest) (*ListServiceResponse, error)
|
||||
@@ -94,9 +107,12 @@ type DirectoryServiceServer interface {
|
||||
mustEmbedUnimplementedDirectoryServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedDirectoryServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedDirectoryServiceServer struct {
|
||||
}
|
||||
// UnimplementedDirectoryServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedDirectoryServiceServer struct{}
|
||||
|
||||
func (UnimplementedDirectoryServiceServer) GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented")
|
||||
@@ -114,6 +130,7 @@ func (UnimplementedDirectoryServiceServer) BroadcastEvent(context.Context, *Even
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BroadcastEvent not implemented")
|
||||
}
|
||||
func (UnimplementedDirectoryServiceServer) mustEmbedUnimplementedDirectoryServiceServer() {}
|
||||
func (UnimplementedDirectoryServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeDirectoryServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DirectoryServiceServer will
|
||||
@@ -123,6 +140,13 @@ type UnsafeDirectoryServiceServer interface {
|
||||
}
|
||||
|
||||
func RegisterDirectoryServiceServer(s grpc.ServiceRegistrar, srv DirectoryServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedDirectoryServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&DirectoryService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -136,7 +160,7 @@ func _DirectoryService_GetService_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.DirectoryService/GetService",
|
||||
FullMethod: DirectoryService_GetService_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DirectoryServiceServer).GetService(ctx, req.(*GetServiceRequest))
|
||||
@@ -154,7 +178,7 @@ func _DirectoryService_ListService_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.DirectoryService/ListService",
|
||||
FullMethod: DirectoryService_ListService_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DirectoryServiceServer).ListService(ctx, req.(*ListServiceRequest))
|
||||
@@ -172,7 +196,7 @@ func _DirectoryService_AddService_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.DirectoryService/AddService",
|
||||
FullMethod: DirectoryService_AddService_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DirectoryServiceServer).AddService(ctx, req.(*ServiceInfo))
|
||||
@@ -190,7 +214,7 @@ func _DirectoryService_RemoveService_Handler(srv interface{}, ctx context.Contex
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.DirectoryService/RemoveService",
|
||||
FullMethod: DirectoryService_RemoveService_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DirectoryServiceServer).RemoveService(ctx, req.(*RemoveServiceRequest))
|
||||
@@ -208,7 +232,7 @@ func _DirectoryService_BroadcastEvent_Handler(srv interface{}, ctx context.Conte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.DirectoryService/BroadcastEvent",
|
||||
FullMethod: DirectoryService_BroadcastEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DirectoryServiceServer).BroadcastEvent(ctx, req.(*EventInfo))
|
||||
|
Reference in New Issue
Block a user