userver: samples/grpc_service/static_config.yaml
Loading...
Searching...
No Matches
samples/grpc_service/static_config.yaml
# 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
# /// [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:
# The list of gRPC client middleware components to use
middlewares: []
# 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). We talk to our own service,
# which is kind of pointless, but works for an example
endpoint: '[::1]:8091'
client-name: greeter
dedicated-channel-counts:
SayHello: 3
SayHelloRequestStream: 2
factory-component: grpc-client-factory
# /// [static config client]
# /// [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
middlewares: []
# /// [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