forked from streamingfast/firehose-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reader_node.go
22 lines (17 loc) · 885 Bytes
/
reader_node.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package firecore
import "golang.org/x/exp/maps"
var ReaderNodeVariablesDocumentation = map[string]string{
"{data-dir}": "The current data-dir path defined by the flag 'data-dir'",
"{node-data-dir}": "The node data dir path defined by the flag 'reader-node-data-dir'",
"{hostname}": "The machine's hostname",
"{start-block-num}": "The resolved start block number defined by the flag 'reader-node-start-block-num' (can be overwritten)",
"{stop-block-num}": "The stop block number defined by the flag 'reader-node-stop-block-num'",
}
var ReaderNodeVariables = maps.Keys(ReaderNodeVariablesDocumentation)
func ReaderNodeVariablesValues(resolver ReaderNodeArgumentResolver) map[string]string {
values := make(map[string]string, len(ReaderNodeVariables))
for _, variable := range ReaderNodeVariables {
values[variable] = resolver(variable)
}
return values
}