Module management

Source
Expand description

Management module for the microsandbox server.

This module provides functionality for managing the microsandbox server lifecycle, including:

  • Starting and stopping the server
  • API key generation and management
  • Process management and signal handling
  • Server configuration and state management

The module implements core server management features such as:

  • Secure server key generation and storage
  • PID file management for process tracking
  • Signal handling for graceful shutdown
  • JWT-based API key generation and formatting

Structs§

Claims
Claims for the JWT token

Constants§

API_KEY_PREFIX
Prefix for the API key

Functions§

clean
Clean up the PID file
convert_jwt_to_api_key
Convert a standard JWT token to our custom API key format Takes a standard JWT token (
..) and returns our custom API key format (<API_KEY_PREFIX><full_jwt_token>)
keygen
Generate a new API key (JWT token)
start
Start the sandbox server
stop
Stop the sandbox server