GG-BFlow will behave Hub-like/Messaging-like Protocol/Streaming-like Protocol for streaming your buffer data to your client.
GG-BFlow utilizing some of the technologies, such as:
- gRPC v1.4.3
- Memcached v1.6.12
- MongoDB v5.0.5
- make
If you are using unix based system, you can install this project dependencies by running make command in root of this project directory
make installGG-BFlow load configuration from .env or system wide Environment Variables. See .env.example for .env template.
Belows are list & description of needed configuration:
| Key | Description | Required | Remarks | |
|---|---|---|---|---|
| LOG | LOG_FORMAT | Log formatting. Available formats: console,json | String. Default json | |
| LOG_LEVEL | Log level filter. Available levels: debug,error,info,warn | String. Default info | ||
| BFlow | BFLOW_HOSTNAME | Hostname where GG-BFlowis running | String. Empty for localhost | |
| BFLOW_PORT | Port to access GG-BFlowgRPC connection | Number. Default 50051 | ||
| BFLOW_API_KEY | Key to securing access to GG-BFlow | ✓ | String | |
| BFLOW_AUTHORIZED_CLIENT | List of authorized client name which will access GG-BFlow. Client need to connect withAuthorizationinmetadatawithBasic Authformat. Client name asusernameandBFLOW_API_KEYaspassword. Ex:CLIENT_NAME:BFLOW_API_KEY | ✓ | String Array (comma ,separated). Example:client1,client2 | |
| BFLOW_BUFFER_SIZE_LIMIT | Limit maximum size of buffer | ✓ | Number. Use 0for no limit | |
| BFLOW_BUFFER_EXP | Buffer will remain exist in this seconds | ✓ | Number. Use 0for no expiration | |
| Mongo | MONGO_DATABASE | MongoDB database name | ✓ | String | 
| MONGO_HOST | MongoDB host | ✓ | String | |
| MONGO_PORT | MongoDB port | ✓ | Number | |
| MONGO_USER | MongoDB username | ✓ | String | |
| MONGO_PASS | MongoDB password | ✓ | String | |
| Memcache | MEMCACHE_HOST | Memcache Host | ✓ | String | 
| MEMCACHE_PORT | Memcache port | ✓ | Number | |
| MEMCACHE_MAX_CONCURRENT | Memcache Connection Max Concurrent | Number. Default 2 | ||
| MEMCACHE_TIMEOUT | Memcache Connection Timeout in milliseconds | Number. Default 100ms | ||
You can build properties to run GG-BFlow using docker by build docker-compose config in deployments/docker-compose.props.yaml. Belows are step to build properties of this project using docker-compose
- Create docker bridge network
docker network create gg-bflow-network- Build properties
docker-compose build -f ./deployments/docker-compose.props.yamlTo install this package, you need to install Go (version 1.17+ is required) & initiate your Go workspace first.
- After you initiate your workspace then you can install this package with below command.
go install github.com/alfarih31/gg-bflow- Import it in your code
import "github.com/alfarih31/gg-bflow"- Alfarih Faza [email protected]
This project is licensed under the - see the LICENSE.md file for details