deployprogress

This commit is contained in:
2023-10-24 20:08:48 +09:00
parent 64ca01c3a7
commit b6b8aa0794
9 changed files with 300 additions and 115 deletions

View File

@ -24,6 +24,7 @@ const _ = grpc.SupportPackageIsVersion7
type OperationClient interface {
Query(ctx context.Context, opts ...grpc.CallOption) (Operation_QueryClient, error)
Refresh(ctx context.Context, in *OperationQueryRequest, opts ...grpc.CallOption) (*Empty, error)
ReportDeployingProgress(ctx context.Context, in *DeployingProgress, opts ...grpc.CallOption) (*Empty, error)
}
type operationClient struct {
@ -74,12 +75,22 @@ func (c *operationClient) Refresh(ctx context.Context, in *OperationQueryRequest
return out, nil
}
func (c *operationClient) ReportDeployingProgress(ctx context.Context, in *DeployingProgress, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := c.cc.Invoke(ctx, "/Operation/ReportDeployingProgress", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OperationServer is the server API for Operation service.
// All implementations must embed UnimplementedOperationServer
// for forward compatibility
type OperationServer interface {
Query(Operation_QueryServer) error
Refresh(context.Context, *OperationQueryRequest) (*Empty, error)
ReportDeployingProgress(context.Context, *DeployingProgress) (*Empty, error)
mustEmbedUnimplementedOperationServer()
}
@ -93,6 +104,9 @@ func (UnimplementedOperationServer) Query(Operation_QueryServer) error {
func (UnimplementedOperationServer) Refresh(context.Context, *OperationQueryRequest) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Refresh not implemented")
}
func (UnimplementedOperationServer) ReportDeployingProgress(context.Context, *DeployingProgress) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReportDeployingProgress not implemented")
}
func (UnimplementedOperationServer) mustEmbedUnimplementedOperationServer() {}
// UnsafeOperationServer may be embedded to opt out of forward compatibility for this service.
@ -150,6 +164,24 @@ func _Operation_Refresh_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
func _Operation_ReportDeployingProgress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeployingProgress)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OperationServer).ReportDeployingProgress(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Operation/ReportDeployingProgress",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OperationServer).ReportDeployingProgress(ctx, req.(*DeployingProgress))
}
return interceptor(ctx, in, info, handler)
}
// Operation_ServiceDesc is the grpc.ServiceDesc for Operation service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -161,6 +193,10 @@ var Operation_ServiceDesc = grpc.ServiceDesc{
MethodName: "Refresh",
Handler: _Operation_Refresh_Handler,
},
{
MethodName: "ReportDeployingProgress",
Handler: _Operation_ReportDeployingProgress_Handler,
},
},
Streams: []grpc.StreamDesc{
{