trpc.group/trpc-go/trpc-go@v1.0.3/testdata/trpc_go_error.yaml (about)

     1  global:                             # global config.
     2    namespace: Development            # environment type, two types: production and development.
     3    env_name: test                    # environment name, names of multiple environments in informal settings.
     4  
     5  server:                                            # server configuration.
     6    app: test                                        # business application name.
     7    server: helloworld                               # service process name.
     8    bin_path: /usr/local/trpc/bin/                   # paths to binary executables and framework configuration files.
     9    conf_path: /usr/local/trpc/conf/                 # paths to business configuration files.
    10    data_path: /usr/local/trpc/data/                 # paths to business data files.
    11    admin:
    12      ip: 127.0.0.1         # ip.
    13      port: 9528            # default: 9028.
    14      read_timeout: 3000    # ms. the timeout setting for the request is accepted and the request information is completely read to prevent slow clients.
    15      write_timeout: 60000  # ms. the timeout setting for processing.
    16      enable_tls: false     # whether to enable TLS, currently not supported.
    17    service: # business service configuration,can have multiple.
    18      - name: trpc.test.helloworld.Greeter1          # the route name of the service.
    19        nic: ethxxxx                                    # the service listening network card address, if configures ip, you don't need to configure it.
    20        port: 8000                                   # the service listening port, can use the placeholder ${port}.
    21        network: tcp                                 # the service listening network type,  tcp or udp.
    22        protocol: trpc                               # application layer protocol, trpc or http.
    23        timeout: 1000                                # maximum request processing time in milliseconds.
    24        idletime: 300000                             # connection idle time in milliseconds.
    25        registry: polaris                            # The service registration method used when the service starts.
    26      - name: trpc.test.helloworld.Greeter2          # the route name of the service.
    27        ip: 127.0.0.1                                # the service listening ip address, can use the placeholder ${ip}, choose one of ip and nic, priority ip.
    28        nic: eth0                                    # the service listening network card address, if configures ip, you don't need to configure it.
    29        port: 8080                                   # the service listening port, can use the placeholder ${port}.
    30        network: tcp                                 # the service listening network type,  tcp or udp.
    31        protocol: http                               # application layer protocol, trpc or http.
    32        timeout: 1000                                # maximum request processing time in milliseconds.
    33        idletime: 300000                             # connection idle time in milliseconds.
    34        registry: polaris                            # The service registration method used when the service starts.
    35  
    36  client:                                            # configuration for client calls.
    37    timeout: 1000                                    # maximum request processing time for all backends.
    38    service:                                         # configuration for a single backend.
    39      - name: trpc.test.helloworld.Greeter1          # backend service name.
    40        namespace: Development                       # backend service environment.
    41        network: tcp                                 # backend service network type, tcp or udp, configuration takes precedence.
    42        discovery: etcd                              # the name of the service discovery component of the backend service, which can be empty.
    43        protocol: trpc                               # application layer protocol, trpc or http.
    44        timeout: 800                                 # maximum request processing time in milliseconds.
    45      - name: trpc.test.helloworld.Greeter2          # backend service name.
    46        namespace: Production                        # backend service environment.
    47        network: tcp                                 # backend service network type, tcp or udp, configuration takes precedence.
    48        target: ip://127.0.0.1:8080                   # the specific address of the backend service, generally not configures, compatible with the old routing method, (e.g. ip://127.0.0.1:8080).
    49        protocol: http                               # application layer protocol, trpc or http.
    50        timeout: 2000                                # maximum request processing time in milliseconds.
    51  
    52  plugins:                                          # plugins configurations.
    53    registry:                                       # service registration configuration.
    54      polaris:                                      # configuration of polaris name registration service.
    55        heartbeat_only: true                        # just report the heartbeat.
    56        heartbeat_interval: 3000                    # name registration service heartbeat reporting interval.
    57        heartbeat_timeout: 1000                     # name registration service heartbeat timeout.
    58        service:
    59          - name:  trpc.test.helloworld.Greeter1    # service name, one-to-one correspondence with the above service configuration.
    60            namespace: ${namespace}                 # environment type, two types: production and development.
    61            token: ${service_token}                 # token required for service registration.
    62            instance_id: ${instance_id}             # instance_id required for service registration.
    63          - name: trpc.test.helloworld.Greeter2
    64            namespace: ${namespace}                 # environment type, two types: production and development.
    65            token: ${service_token}                 # token required for service registration.
    66            instance_id: ${instance_id}             # instance_id required for service registration.
    67  
    68    selector:                                       # configuration for user-defined selectors.
    69      polaris:                                      # internal configuration for polaris overall api.
    70        discovery:                                  # service discovery configuration for polaris overall api.
    71          refresh_interval: 10000                   # the time when the name routing information is refreshed synchronously.
    72          timeout: 2000                             # name service request timeout in milliseconds.
    73          protocol: grpc                            # name Service remote interaction protocol type.
    74        loadbalance:                                # load balancing configuration of polaris overall api.
    75          name: wr                                  # load balancing strategy of polaris overall api.
    76        curcuitbreaker:                             # circuit breaker configuration of polaris overall api.
    77          name: rate                                # circuit breaker strategy of polaris overall api.
    78        address_list: ${polaris_address_list}       # name service remote address list.
    79  
    80    discovery:                                      # service discovery configuration.
    81      polaris:                                      # configuration for polaris service discovery.
    82        refresh_interval: 10000                     # sync refresh time.
    83        timeout: 2000                               # request timeout in milliseconds.
    84        protocol: trpc                              # name Service remote interaction protocol type.
    85      etcd:                                         # configuration for etcd service discovery.
    86        timeout: 2000                               # request timeout in milliseconds.
    87        address: 127.0.0.1:2379                     # etcd remote address.
    88  
    89    loadbalance:                                    # load balancing configuration.
    90      wrr:                                          # the configuration of the wrr algorithm implemented by trpc.
    91        interval: 10                                # interval time.
    92      polaris_wr:                                   # the configuration of polaris wr algorithm.
    93        interval: 10                                # interval time.
    94      polaris_random:                               # the configuration of polaris random algorithm.
    95        interval: 10                                # interval time.
    96  
    97    curcuitbreaker:                                 # circuit breaker configuration.
    98      polaris_rate:                                 # the configuration of polaris rate algorithm.
    99        threshold: 10                               # threshold.
   100      polaris_err:                                  # the configuration of polaris err algorithm.
   101        threshold: 10                               # threshold.
   102  
   103    config:                                         # the configuration of business configuration center.
   104      tconf:                                        # tconf: the name of the remote configuration center.
   105        refresh_interval: 10000                     # sync update interval time.
   106        timeout: 1000                               # pull remote configuration timeout.
   107        app_id: test                                # pull remote configuration appid.
   108  
   109    tracing:                                # tracing configuration.
   110      jaeger:                               # uber jaeger.
   111        serviceName: trpc-ecosystem
   112        disabled: false
   113        sampler:
   114          type: const
   115          param: 1
   116        reporter:
   117          localAgentHostPort: localhost:6831