feat: sync httpdns sdk/platform updates without large binaries
This commit is contained in:
@@ -46,6 +46,8 @@ const (
|
||||
NSNodeService_UpdateNSNodeDDoSProtection_FullMethodName = "/pb.NSNodeService/updateNSNodeDDoSProtection"
|
||||
NSNodeService_FindNSNodeAPIConfig_FullMethodName = "/pb.NSNodeService/findNSNodeAPIConfig"
|
||||
NSNodeService_UpdateNSNodeAPIConfig_FullMethodName = "/pb.NSNodeService/updateNSNodeAPIConfig"
|
||||
NSNodeService_FindAllUpgradeNSNodesWithNSClusterId_FullMethodName = "/pb.NSNodeService/findAllUpgradeNSNodesWithNSClusterId"
|
||||
NSNodeService_UpgradeNSNode_FullMethodName = "/pb.NSNodeService/upgradeNSNode"
|
||||
)
|
||||
|
||||
// NSNodeServiceClient is the client API for NSNodeService service.
|
||||
@@ -108,6 +110,10 @@ type NSNodeServiceClient interface {
|
||||
FindNSNodeAPIConfig(ctx context.Context, in *FindNSNodeAPIConfigRequest, opts ...grpc.CallOption) (*FindNSNodeAPIConfigResponse, error)
|
||||
// 修改某个节点的API相关配置
|
||||
UpdateNSNodeAPIConfig(ctx context.Context, in *UpdateNSNodeAPIConfigRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 列出所有需要升级的NS节点
|
||||
FindAllUpgradeNSNodesWithNSClusterId(ctx context.Context, in *FindAllUpgradeNSNodesWithNSClusterIdRequest, opts ...grpc.CallOption) (*FindAllUpgradeNSNodesWithNSClusterIdResponse, error)
|
||||
// 升级单个NS节点
|
||||
UpgradeNSNode(ctx context.Context, in *UpgradeNSNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
}
|
||||
|
||||
type nSNodeServiceClient struct {
|
||||
@@ -391,6 +397,26 @@ func (c *nSNodeServiceClient) UpdateNSNodeAPIConfig(ctx context.Context, in *Upd
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSNodeServiceClient) FindAllUpgradeNSNodesWithNSClusterId(ctx context.Context, in *FindAllUpgradeNSNodesWithNSClusterIdRequest, opts ...grpc.CallOption) (*FindAllUpgradeNSNodesWithNSClusterIdResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FindAllUpgradeNSNodesWithNSClusterIdResponse)
|
||||
err := c.cc.Invoke(ctx, NSNodeService_FindAllUpgradeNSNodesWithNSClusterId_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSNodeServiceClient) UpgradeNSNode(ctx context.Context, in *UpgradeNSNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, NSNodeService_UpgradeNSNode_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NSNodeServiceServer is the server API for NSNodeService service.
|
||||
// All implementations should embed UnimplementedNSNodeServiceServer
|
||||
// for forward compatibility.
|
||||
@@ -451,6 +477,10 @@ type NSNodeServiceServer interface {
|
||||
FindNSNodeAPIConfig(context.Context, *FindNSNodeAPIConfigRequest) (*FindNSNodeAPIConfigResponse, error)
|
||||
// 修改某个节点的API相关配置
|
||||
UpdateNSNodeAPIConfig(context.Context, *UpdateNSNodeAPIConfigRequest) (*RPCSuccess, error)
|
||||
// 列出所有需要升级的NS节点
|
||||
FindAllUpgradeNSNodesWithNSClusterId(context.Context, *FindAllUpgradeNSNodesWithNSClusterIdRequest) (*FindAllUpgradeNSNodesWithNSClusterIdResponse, error)
|
||||
// 升级单个NS节点
|
||||
UpgradeNSNode(context.Context, *UpgradeNSNodeRequest) (*RPCSuccess, error)
|
||||
}
|
||||
|
||||
// UnimplementedNSNodeServiceServer should be embedded to have
|
||||
@@ -541,6 +571,12 @@ func (UnimplementedNSNodeServiceServer) FindNSNodeAPIConfig(context.Context, *Fi
|
||||
func (UnimplementedNSNodeServiceServer) UpdateNSNodeAPIConfig(context.Context, *UpdateNSNodeAPIConfigRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateNSNodeAPIConfig not implemented")
|
||||
}
|
||||
func (UnimplementedNSNodeServiceServer) FindAllUpgradeNSNodesWithNSClusterId(context.Context, *FindAllUpgradeNSNodesWithNSClusterIdRequest) (*FindAllUpgradeNSNodesWithNSClusterIdResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllUpgradeNSNodesWithNSClusterId not implemented")
|
||||
}
|
||||
func (UnimplementedNSNodeServiceServer) UpgradeNSNode(context.Context, *UpgradeNSNodeRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpgradeNSNode not implemented")
|
||||
}
|
||||
func (UnimplementedNSNodeServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeNSNodeServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -1036,6 +1072,42 @@ func _NSNodeService_UpdateNSNodeAPIConfig_Handler(srv interface{}, ctx context.C
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSNodeService_FindAllUpgradeNSNodesWithNSClusterId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindAllUpgradeNSNodesWithNSClusterIdRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSNodeServiceServer).FindAllUpgradeNSNodesWithNSClusterId(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NSNodeService_FindAllUpgradeNSNodesWithNSClusterId_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSNodeServiceServer).FindAllUpgradeNSNodesWithNSClusterId(ctx, req.(*FindAllUpgradeNSNodesWithNSClusterIdRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSNodeService_UpgradeNSNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpgradeNSNodeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSNodeServiceServer).UpgradeNSNode(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: NSNodeService_UpgradeNSNode_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSNodeServiceServer).UpgradeNSNode(ctx, req.(*UpgradeNSNodeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// NSNodeService_ServiceDesc is the grpc.ServiceDesc for NSNodeService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -1147,6 +1219,14 @@ var NSNodeService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "updateNSNodeAPIConfig",
|
||||
Handler: _NSNodeService_UpdateNSNodeAPIConfig_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findAllUpgradeNSNodesWithNSClusterId",
|
||||
Handler: _NSNodeService_FindAllUpgradeNSNodesWithNSClusterId_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "upgradeNSNode",
|
||||
Handler: _NSNodeService_UpgradeNSNode_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user