github.com/polarismesh/polaris@v1.17.8/service/circuitbreaker_config.go (about)

     1  /**
     2   * Tencent is pleased to support the open source community by making Polaris available.
     3   *
     4   * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
     5   *
     6   * Licensed under the BSD 3-Clause License (the "License");
     7   * you may not use this file except in compliance with the License.
     8   * You may obtain a copy of the License at
     9   *
    10   * https://opensource.org/licenses/BSD-3-Clause
    11   *
    12   * Unless required by applicable law or agreed to in writing, software distributed
    13   * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
    14   * CONDITIONS OF ANY KIND, either express or implied. See the License for the
    15   * specific language governing permissions and limitations under the License.
    16   */
    17  
    18  package service
    19  
    20  import (
    21  	"context"
    22  
    23  	apifault "github.com/polarismesh/specification/source/go/api/v1/fault_tolerance"
    24  	apimodel "github.com/polarismesh/specification/source/go/api/v1/model"
    25  	apiservice "github.com/polarismesh/specification/source/go/api/v1/service_manage"
    26  
    27  	api "github.com/polarismesh/polaris/common/api/v1"
    28  )
    29  
    30  // CreateCircuitBreakers 批量创建熔断规则
    31  func (s *Server) CreateCircuitBreakers(
    32  	ctx context.Context, req []*apifault.CircuitBreaker) *apiservice.BatchWriteResponse {
    33  	resps := api.NewBatchWriteResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    34  	return resps
    35  }
    36  
    37  // CreateCircuitBreakerVersions 批量创建熔断规则版本
    38  func (s *Server) CreateCircuitBreakerVersions(
    39  	ctx context.Context, req []*apifault.CircuitBreaker) *apiservice.BatchWriteResponse {
    40  	resps := api.NewBatchWriteResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    41  	return resps
    42  }
    43  
    44  // DeleteCircuitBreakers 批量删除熔断规则
    45  func (s *Server) DeleteCircuitBreakers(
    46  	ctx context.Context, req []*apifault.CircuitBreaker) *apiservice.BatchWriteResponse {
    47  	resps := api.NewBatchWriteResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    48  	return resps
    49  }
    50  
    51  // UpdateCircuitBreakers 批量修改熔断规则
    52  func (s *Server) UpdateCircuitBreakers(
    53  	ctx context.Context, req []*apifault.CircuitBreaker) *apiservice.BatchWriteResponse {
    54  	resps := api.NewBatchWriteResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    55  	return resps
    56  }
    57  
    58  // ReleaseCircuitBreakers 批量发布熔断规则
    59  func (s *Server) ReleaseCircuitBreakers(
    60  	ctx context.Context, req []*apiservice.ConfigRelease) *apiservice.BatchWriteResponse {
    61  	resps := api.NewBatchWriteResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    62  	return resps
    63  }
    64  
    65  // UnBindCircuitBreakers 批量解绑熔断规则
    66  func (s *Server) UnBindCircuitBreakers(
    67  	ctx context.Context, req []*apiservice.ConfigRelease) *apiservice.BatchWriteResponse {
    68  	resps := api.NewBatchWriteResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    69  	return resps
    70  }
    71  
    72  // GetCircuitBreaker 根据id和version查询熔断规则
    73  func (s *Server) GetCircuitBreaker(ctx context.Context, query map[string]string) *apiservice.BatchQueryResponse {
    74  	resps := api.NewBatchQueryResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    75  	return resps
    76  }
    77  
    78  // GetCircuitBreakerVersions 根据id查询熔断规则所有版本
    79  func (s *Server) GetCircuitBreakerVersions(
    80  	ctx context.Context, query map[string]string) *apiservice.BatchQueryResponse {
    81  	resps := api.NewBatchQueryResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    82  	return resps
    83  }
    84  
    85  // GetMasterCircuitBreakers 查询master熔断规则
    86  func (s *Server) GetMasterCircuitBreakers(
    87  	ctx context.Context, query map[string]string) *apiservice.BatchQueryResponse {
    88  	resps := api.NewBatchQueryResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    89  	return resps
    90  }
    91  
    92  // GetReleaseCircuitBreakers 根据规则id查询已发布规则
    93  func (s *Server) GetReleaseCircuitBreakers(
    94  	ctx context.Context, query map[string]string) *apiservice.BatchQueryResponse {
    95  	resps := api.NewBatchQueryResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
    96  	return resps
    97  }
    98  
    99  // GetCircuitBreakerByService 根据服务查询绑定熔断规则
   100  func (s *Server) GetCircuitBreakerByService(
   101  	ctx context.Context, query map[string]string) *apiservice.BatchQueryResponse {
   102  	resps := api.NewBatchQueryResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
   103  	return resps
   104  }
   105  
   106  // GetCircuitBreakerToken 查询熔断规则的token
   107  func (s *Server) GetCircuitBreakerToken(ctx context.Context, req *apifault.CircuitBreaker) *apiservice.Response {
   108  	resps := api.NewResponseWithMsg(apimodel.Code_BadRequest, "API is Deprecated")
   109  	return resps
   110  }