gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/go-control-plane/pkg/test/v3/register.go (about)

     1  // Copyright 2018 Envoyproxy Authors
     2  //
     3  //   Licensed under the Apache License, Version 2.0 (the "License");
     4  //   you may not use this file except in compliance with the License.
     5  //   You may obtain a copy of the License at
     6  //
     7  //       http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  //   Unless required by applicable law or agreed to in writing, software
    10  //   distributed under the License is distributed on an "AS IS" BASIS,
    11  //   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  //   See the License for the specific language governing permissions and
    13  //   limitations under the License.
    14  
    15  // Package test contains test utilities
    16  package test
    17  
    18  import (
    19  	"gitee.com/ks-custle/core-gm/grpc"
    20  
    21  	accessloggrpc "gitee.com/ks-custle/core-gm/go-control-plane/envoy/service/accesslog/v3"
    22  	clusterservice "gitee.com/ks-custle/core-gm/go-control-plane/envoy/service/cluster/v3"
    23  	discoverygrpc "gitee.com/ks-custle/core-gm/go-control-plane/envoy/service/discovery/v3"
    24  	endpointservice "gitee.com/ks-custle/core-gm/go-control-plane/envoy/service/endpoint/v3"
    25  	listenerservice "gitee.com/ks-custle/core-gm/go-control-plane/envoy/service/listener/v3"
    26  	routeservice "gitee.com/ks-custle/core-gm/go-control-plane/envoy/service/route/v3"
    27  	runtimeservice "gitee.com/ks-custle/core-gm/go-control-plane/envoy/service/runtime/v3"
    28  	secretservice "gitee.com/ks-custle/core-gm/go-control-plane/envoy/service/secret/v3"
    29  	"gitee.com/ks-custle/core-gm/go-control-plane/pkg/server/v3"
    30  )
    31  
    32  // RegisterAccessLogServer starts an accessloggrpc service.
    33  func RegisterAccessLogServer(grpcServer *grpc.Server, als *AccessLogService) {
    34  	accessloggrpc.RegisterAccessLogServiceServer(grpcServer, als)
    35  }
    36  
    37  // RegisterServer registers with v3 services.
    38  func RegisterServer(grpcServer *grpc.Server, server server.Server) {
    39  	// register services
    40  	discoverygrpc.RegisterAggregatedDiscoveryServiceServer(grpcServer, server)
    41  	endpointservice.RegisterEndpointDiscoveryServiceServer(grpcServer, server)
    42  	clusterservice.RegisterClusterDiscoveryServiceServer(grpcServer, server)
    43  	routeservice.RegisterRouteDiscoveryServiceServer(grpcServer, server)
    44  	listenerservice.RegisterListenerDiscoveryServiceServer(grpcServer, server)
    45  	secretservice.RegisterSecretDiscoveryServiceServer(grpcServer, server)
    46  	runtimeservice.RegisterRuntimeDiscoveryServiceServer(grpcServer, server)
    47  }