Hidden Lake Loader
The Hidden Lake Loader
is a small service of the Hidden Lake network applications. It is used to redirect traffic from HLT producers (storages) to HLT consumers. Previously, it was used as a component of HLM, and then HLS applications.
$ go install github.com/number571/hidden-lake/cmd/hll@latest
HLL uses the HLT service interface to download and upload messages. This property is necessary to redirect multiple messages to HLT once, and then to HLS services.
Figure 1. Architecture of HLL.
- Windows (x86_64, arm64)
- Linux (x86_64, arm64)
- MacOS (x86_64, arm64)
Default build and run
$ go run ./cmd/hll
> [INFO] 2023/12/03 02:12:51 HLL is running...
> ...
Open ports 9561
(HTTP).
Creates ./hll.yml
file.
Default config hll.yml
settings:
messages_capacity: 2048
logging:
- info
- warn
- erro
address:
http: 127.0.0.1:9561
$ hll -path=/root -network=xxx
# path = path to config and database files
# network = use network configuration from networks.yml
In the example, two HLT services are created, where one is a message producer, the other a consumer. First, messages are entered into the manufacturer, then the HLL (message transportation) function is turned on, and at the end, the delivery of all previously entered messages is checked, but already on the consumer's side.
Figure 2. Example of running HLL service.
Build and run HLT services
$ cd examples/traffic_actions/loader
$ make
Run transfer
$ cd examples/traffic_actions/loader/client_hll
$ go run ./main.go
Get valid response
messages have been successfully transported
"logging" Enable loggins in/out actions in the network
"address" API addresses for HLT functions
"consumers" A list of the HLT consumers
"producers" A list of the HLTs producers
settings:
messages_capacity: 2048
work_size_bits: 22
network_key: hlt-network-key
logging:
- info
- warn
- erro
address:
http: 127.0.0.1:9561
producers:
- localhost:8582
consumers:
- localhost:7582
"result" is string
"return" is int; 1 = success
{
"result":"hidden-lake-loader",
"return":1
}
1. POST/DELETE /api/network/transfer
2. GET /api/config/settings
curl -i -X POST -H 'Accept: application/json' http://localhost:9561/api/network/transfer
HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 07 Aug 2023 02:59:42 GMT
Content-Length: 68
success: run transfer
curl -i -X DELETE -H 'Accept: application/json' http://localhost:9561/api/network/transfer
HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 07 Aug 2023 02:59:42 GMT
Content-Length: 68
success: stop transfer
curl -i -X GET -H 'Accept: application/json' http://localhost:9561/api/config/settings
HTTP/1.1 200 OK
Content-Type: application/json
Date: Sat, 23 Dec 2023 17:09:53 GMT
Content-Length: 46
{"messages_capacity":2048,"work_size_bits":22}