From 703b31b83aa456d125f2f1bb180107ba4f54c0a5 Mon Sep 17 00:00:00 2001 From: Dmitry Simonenko Date: Fri, 30 Mar 2018 13:47:46 +0300 Subject: [PATCH] odyssey: documentation: update storage section --- documentation/configuration.md | 81 ++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 28 deletions(-) diff --git a/documentation/configuration.md b/documentation/configuration.md index 227a4de6..010559dd 100644 --- a/documentation/configuration.md +++ b/documentation/configuration.md @@ -278,42 +278,50 @@ On client accept appropriate route is assigned by matching `database` and `user` sections, all requests then forwarded to a `storage` (which is referenced from the `user` section). -`Database | default` - -Defines database name requested by client. Each `database` section structure -consist of a `user` subsections. - -A special `database default` is used, in case when no database is matched. - -`User | default` - -Defines authentication, pooling and storage settings for -requested route. - -A special `user default` is used, in case when no user is matched. - -`Storage ` +### Storage Defines server used as a data storage or admin console operations. +`storage { options }` + +#### type string + +Set storage type to use. Supported types: + +``` +"remote" - PostgreSQL server +"local" - Odyssey (admin console) +``` + +`type "remote"` + +#### host string + +Remote server address. + +#### port integer + +Remote server port. + +#### tls string + +Supported TLS modes: + +``` +"disable" - disable TLS protocol +"allow" - switch to TLS protocol on request +"require" - TLS required +"verify_ca" - require valid certificate +"verify_full" - require valid ceritifcate +``` + +Storage example: + ``` storage "postgres_server" { -# -# Storage type. -# -# "remote" - PostgreSQL server -# "local" - Odyssey (admin console) -# type "remote" -# -# Remote server address. host "127.0.0.1" -# -# Remote server port. port 5432 -# -# Remote server TLS settings. -# # tls "disable" # tls_ca_file "" # tls_key_file "" @@ -322,6 +330,23 @@ storage "postgres_server" { } ``` +### Database and User + +`database | default { users }` + +Defines database name requested by client. Each `database` section structure +consist of a `user` subsections. + +A special `database default` is used, in case when no database is matched. + +`user | default { options }` + +Defines authentication, pooling and storage settings for +requested route. + +A special `user default` is used, in case when no user is matched. + + ``` database default { user default {