Advanced

RK provide bootstrapper for popular frameworks in order to save time for learning complex initializing process.

Overview

In advanced user guide, we will introduce how to enable bellow functionalities by modifying boot.yaml.

Functionality Description
Locale How to distinguish environment based os OS.Environment
Logging Use user defined logging
TLS Enable TLS support
Config Use viper config
AppInfo Use custom application information
Multiple entries Start multiple GRPC entries
Shutdown hook Register shutdown hook functions
Error type Use standard error type
Override bootstrapper Override bootstrapper
Trace RPC with logs Trace RPC logs based on traceId
Custom routes in grpc-gateway Add custom routes to grpc-gateway
File uploads Support API uploading files to server.

Locale

Distinguish entries based on different environment.

Logging

Customise logging.

TLS/SSL

Enable TLS/SSL for the server.

Config

How to read configs in local file system.

AppInfo

How to specify application info in boot.yaml?

Multiple entries

How to start multiple Grpc server with different port in one process?

Error type

What is the best way to return an RPC error?

Shutdown hook

How to add shutdown hook function while receiving shutdown signal?

Override bootstrapper

Is there any way to override boot.yaml or values in boot.yaml at start time?

Trace RPC with logs

How to trace RPC with logs?

Custom routes

How to add custom routes in grpc-gateway without grpc?

File uploads

How to upload file with grpc-gateway?

Last modified July 12, 2021 : Add chinese version of document (f8db16e)