userver: samples/grpc_service/configs/static_config.yaml
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
samples/grpc_service/configs/static_config.yaml
components_manager:
    components:
        # The required common components
        logging:
            fs-task-processor: fs-task-processor
            loggers:
                default:
                    file_path: '@stderr'
                    level: debug
                    overflow_behavior: discard
 
        congestion-control:
# /// [static config client]
# yaml
        # Contains machinery common to all gRPC clients
        grpc-client-common:
            # The TaskProcessor for blocking connection initiation
            blocking-task-processor: grpc-blocking-task-processor
 
        # Creates gRPC clients
        grpc-client-factory:
            # Optional channel parameters for gRPC Core
            # https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
            channel-args: {}
 
        # Our wrapper around the generated client for GreeterService
        greeter-client:
            # The service endpoint (URI).
            endpoint: $greeter-endpoint
            client-name: greeter
            dedicated-channel-counts:
                SayHello: 3
                SayHelloRequestStream: 2
            factory-component: grpc-client-factory
 
# /// [static config client]
        grpc-server-middlewares-pipeline:
 
# /// [static config server]
# yaml
        # Common configuration for gRPC server
        grpc-server:
            # The single listening port for incoming RPCs
            port: $grpc_server_port
            port#fallback: 8091
            completion-queue-count: 3
 
        # Our GreeterService implementation
        greeter-service:
            task-processor: main-task-processor
            greeting-prefix: Hello
# /// [static config server]
 
        # In this example, the tests still communicate with the microservice
        # using HTTP, so we still need an HTTP server and an HTTP handler.
        server:
            listener:
                port: 8092
                task_processor: main-task-processor
        greeter-http-handler:
            path: /hello
            method: POST
            task_processor: main-task-processor
 
        testsuite-support:
 
    default_task_processor: main-task-processor  # Task processor in which components start.
 
# /// [task processor]
# yaml
    task_processors:
        grpc-blocking-task-processor:  # For blocking gRPC channel creation
            worker_threads: 2
            thread_name: grpc-worker
# /// [task processor]
        main-task-processor:           # For non-blocking operations
            worker_threads: 8
        fs-task-processor:             # For blocking filesystem operations
            worker_threads: 2