feat: MQTT integration
This commit is contained in:
73
docs/README.md
Normal file
73
docs/README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# SPORE Gateway Documentation
|
||||
|
||||
Welcome to the SPORE Gateway documentation. This directory contains detailed documentation for various features and capabilities of the gateway.
|
||||
|
||||
## Available Documentation
|
||||
|
||||
### [MQTT Integration](./MQTT.md)
|
||||
Comprehensive guide to the MQTT integration feature, including:
|
||||
- Setting up MQTT integration
|
||||
- Message format and handling
|
||||
- Testing with local MQTT brokers
|
||||
- Architecture and data flow
|
||||
- Troubleshooting and best practices
|
||||
|
||||
### [Rollout Process](./Rollout.md)
|
||||
Detailed documentation for the firmware rollout system:
|
||||
- Parallel firmware updates across multiple nodes
|
||||
- WebSocket progress updates
|
||||
- Integration with spore-registry
|
||||
- API endpoints and message formats
|
||||
|
||||
## Quick Links
|
||||
|
||||
- **Main README**: [../README.md](../README.md)
|
||||
- **Hack Directory**: [../hack/README.md](../hack/README.md)
|
||||
- **Testing Scripts**: [../hack/](../hack/)
|
||||
|
||||
## Feature Overview
|
||||
|
||||
### Core Features
|
||||
- UDP-based node discovery
|
||||
- Cluster management and primary node selection
|
||||
- HTTP API server for cluster operations
|
||||
- WebSocket real-time updates
|
||||
- Failover logic for automatic primary switching
|
||||
- Generic proxy calls to SPORE nodes
|
||||
|
||||
### Integration Features
|
||||
- **MQTT Integration**: Subscribe to MQTT topics and forward messages to WebSocket clients
|
||||
- **Firmware Rollout**: Orchestrated firmware updates across the cluster
|
||||
- **Registry Proxy**: Proxy for spore-registry firmware management
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. **Basic Setup**: See [Main README](../README.md) for installation and basic usage
|
||||
2. **MQTT Integration**: See [MQTT.md](./MQTT.md) for MQTT setup and testing
|
||||
3. **Testing**: See [Hack README](../hack/README.md) for local testing tools
|
||||
|
||||
## Development
|
||||
|
||||
The gateway is written in Go and follows modern Go best practices:
|
||||
- Structured logging using logrus
|
||||
- Graceful shutdown handling
|
||||
- Concurrent-safe operations
|
||||
- HTTP middleware for CORS and logging
|
||||
- WebSocket support for real-time updates
|
||||
|
||||
## Contributing
|
||||
|
||||
When adding new features:
|
||||
1. Update relevant documentation in this directory
|
||||
2. Add examples to the `hack/` directory
|
||||
3. Update the main README with feature highlights
|
||||
4. Follow the existing documentation style and structure
|
||||
|
||||
## Support
|
||||
|
||||
For questions or issues:
|
||||
- Check the relevant documentation in this directory
|
||||
- Review gateway logs for error messages
|
||||
- Use testing tools in the `hack/` directory
|
||||
- Check the main README for troubleshooting tips
|
||||
|
||||
Reference in New Issue
Block a user