bloader

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 1 Imported by: 0

README ΒΆ

Bloader

Go Reference CI Test Coverage Go Report Card License Release Last Commit Go Version

Bloader is a cutting-edge load testing tool designed for simplicity and flexibility. While still in active development, it already offers robust features to execute and manage load tests effectively. We welcome contributions from the community to help shape its future. πŸ’‘

[!WARNING]
This page describes minimal documentation but does not explain the definition of a loader.

See Bloader Docs for more information.

✨ Key Features

βœ”οΈ Internal Storage: Bloader can store request data for enhanced testing capabilities.

βœ”οΈ Master-Slave Architecture: Avoid client-side bottlenecks by leveraging gRPC communication between Master and Slave nodes.

βœ”οΈ Human-Friendly Configuration: Load tests are defined using YAML, with support for Sprig's template engine (used in Helm), offering exceptional flexibility.


πŸ› οΈ Installation

Many installation methods are supported, details of which can be found at Installation for details.

πŸ“„ Configuration File Support

Bloader supports multiple formats, including YAML, JSON, and TOML, via the Viper library. Configuration items differ for Master and Slave nodes and can be overridden by environment variables prefixed with BLOADER_, which take precedence over file-based configurations.

Example: Master Configuration

version: v1
type: master
env: "production"
loader:
  base_path: "loader"
targets:
  - id: "apiServer"
    type: "http"
    values:
      - env: "local"
        url: "http://localhost:8080"
      - env: "production"
        url: "https://api.example.org"
outputs:
  - id: "localOutput"
    values:
      - env: "production"
        type: "local"
        format: "csv"
        base_path: "outputs/prod"
store:
  file:
    - env: "production"
      path: "local_store/prod_store.db"
encrypts:
  - id: "dynamicEncrypt"
    type: "dynamicCBC"
    store:
      bucket_id: "encryptBucket"
      key: "dynamicKey"
server:
  port: 9800
logging:
  output:
    - type: "stdout"
      format: "text"
      level: "warn"

Example: Slave Configuration

version: v1
type: slave
env: "production"
slave_setting:
  port: 50051
  certificate:
    enabled: true
    slave_cert: "certs/slave.crt"
    slave_key: "certs/slave.key"
logging:
  output:
    - type: "file"
      filename: "logs/slave.log"
      format: "text"
      level: "warn"

βš™οΈ Command-Line Interface

Global Options

  • Config File: Override the default configuration path.
    bloader {command} -c /path/to/config.yaml
    
  • Help: Display help for any command.
    bloader help
    

Common Commands

  • Show Current Config: Displays the merged configuration after overrides.
    bloader config
    
  • Encrypt/Decrypt Data: Secure your data using pre-configured encryption settings.
    bloader encrypt "test-data" -i dynamicEncrypt
    bloader encrypt "encrypted-data" -i dynamicEncrypt -d
    

Master-Specific Commands

  • Run Load Test: Execute a load test using a specified file.
    bloader run -f loader.yaml
    
  • Authenticate: Manage authentication tokens.
    bloader auth login -i oauthAuth
    
  • Manage Data Store:
    bloader store list
    bloader store object get --bucket encryptBucket keyName
    

Slave-Specific Commands

  • Start Slave Node: Initialize a Slave node for distributed testing.
    bloader slave run -c /path/to/slave_config.yaml
    

🎯 Supported Features

  • Load Test Definitions: Define targets and parameters using YAML.
  • Internal and Memory Store: Data can be persisted or temporarily stored for flexibility.
  • Extensible Encryption: Supports dynamic and static encryption configurations.
  • Multi-Environment Support: Easily switch between environments (e.g., local, production).

πŸš€ Planned Features

  • Transition from BoltDB to a more actively maintained database.
  • Integration with cloud services for configuration overrides.
  • Enhanced analysis tools and visualization capabilities.
  • Web-based UI for intuitive load test management.
  • Support for gRPC-based targets.
  • Plugin system for custom extensions.

🀝 Contributing

We welcome contributions of all kinds! If you're interested in improving Bloader, please:

  1. Fork the repository.
  2. Make your changes in a new branch.
  3. Submit a pull request with a detailed description.

For more details, see contribution file.


  • Sprig: Template engine for flexible configurations.
  • Cobra: CLI framework.
  • Viper: Configuration management.
  • Bolt: Lightweight internal database.

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

Documentation ΒΆ

Overview ΒΆ

Copyright Β© 2024 cresplanex <open-source-github@cresplanex.com>

Directories ΒΆ

Path Synopsis
gen
internal
agerror
Package agerror provides aggregated error handling.
Package agerror provides aggregated error handling.
auth
Package auth provides the authentication logic for the application
Package auth provides the authentication logic for the application
clock
Package clock provides the clock interface for the application.
Package clock provides the clock interface for the application.
clock/fakeclock
Package fakeclock provides a fake clock implementation.
Package fakeclock provides a fake clock implementation.
config
Package config provides configuration for the application.
Package config provides configuration for the application.
container
Package container provides the dependencies for the application.
Package container provides the dependencies for the application.
encrypt
Package encrypt provides the encrypter for the application.
Package encrypt provides the encrypter for the application.
executor/httpexec
Package httpexec provides the executor for the HTTP request.
Package httpexec provides the executor for the HTTP request.
i18n
Package i18n provides internationalization support for the application.
Package i18n provides internationalization support for the application.
logger
Package logger provides logging functionality for the application
Package logger provides logging functionality for the application
master
Package master provides the master node.
Package master provides the master node.
output
Package output provides a set of functions to write the data to the output.
Package output provides a set of functions to write the data to the output.
prompt
Package prompt provides a set of functions to prompt the user to enter a value.
Package prompt provides a set of functions to prompt the user to enter a value.
runner
Package runner provides the logic for running the load test
Package runner provides the logic for running the load test
runner/matcher
Package matcher provides a way to match a test against a pattern.
Package matcher provides a way to match a test against a pattern.
slave
Package slave provides the slave node of the bloader.
Package slave provides the slave node of the bloader.
slave/slcontainer
Package slcontainer provides the container for the slave node
Package slcontainer provides the container for the slave node
store
Package store provides the store logic for the application
Package store provides the store logic for the application
target
Package target provides the container for the target node
Package target provides the container for the target node
utils
Package utils provides utility functions for the application
Package utils provides utility functions for the application

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL