You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 7, 2024. It is now read-only.
In this part of documentation we are going to explain config in ttrace.
4
+
5
+
### config file
6
+
7
+
In ttrace we have config in `yaml` format, you can see default config example [here](../../config/config.yaml).
8
+
Now we explain each part of config one by one.
9
+
10
+
#### name
11
+
12
+
First of all we have a name, which is name of instance you are running (you can use it on application layer and get it by commands).
13
+
This is name field in `config.yaml`:
14
+
15
+
```yml
16
+
name: time_trace
17
+
```
18
+
19
+
#### server
20
+
21
+
In server part you can config this two: which ip? which port? for listening and serving the TCP server.
22
+
23
+
This is how it looks in `config.yaml`:
24
+
25
+
```yml
26
+
server:
27
+
listen: localhost
28
+
port: "7070"
29
+
```
30
+
31
+
#### log
32
+
33
+
This part will help you to config log stuff (levels, saving path and...).
34
+
35
+
How it looks in `config.yaml`:
36
+
37
+
```yml
38
+
log:
39
+
write_to_file: true
40
+
path: ttrace.log
41
+
```
42
+
43
+
#### users
44
+
45
+
In users part, you define who can access the database and set permission for them. `name` and `password` field is user pass for connecting (required in `CON` command).
46
+
47
+
In `cmds` you provide which command in [TQL](../TQL/) they have access to. It can be a list of commands or just a `'*'` which means all.
48
+
Also the `CON` command is open for everyone.
49
+
50
+
example:
51
+
52
+
```yml
53
+
users:
54
+
- name: root
55
+
password: super_secret_password
56
+
cmds:
57
+
- '*'
58
+
59
+
# Also you can use this for multiple users and limited commands
0 commit comments