daoframe

module
v0.0.0-...-01b7989 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0

README ΒΆ

DaoFrame

go version license release

A highly modular, flexible, and concurrent framework inspired by Daoist philosophy. Designed for scalable, high-performance applications, it provides efficient lifecycle management, task scheduling, and state coordination for distributed systems, microservices, and IoT.

🌟 Features

  • Design Philosophy Based on Natural Law

    • State management based on Yin-Yang and Five Elements
    • Adaptive lifecycle system
    • Flexible energy flow mechanism
  • High-Performance Concurrency

    • Multi-level locking mechanism
    • Optimized shard locks
    • Asynchronous event handling
  • Complete Lifecycle Management

    • Entity creation and destruction
    • State transition and validation
    • Automatic resource recycling
  • Flexible Configuration System

    • Multi-environment support
    • Dynamic configuration updates
    • Comprehensive parameter validation

πŸš€ Quick Start

Requirements
  • Go 1.20 or higher
  • Concurrent-capable operating system (Linux/macOS/Windows)
Installation
go get github.com/Corphon/daoframe
Basic Usage
package main

import (
    "github.com/Corphon/daoframe/core"
    "context"
)

func main() {
    // Create TaiJi, implementing "Dao generates One"
    taiji := core.NewTaiJi()
    
    // Generate Yin-Yang, implementing "One generates Two"
    yinyang, err := taiji.Generate()
    if err != nil {
        panic(err)
    }
    
    // Start lifecycle system
    if err := yinyang.Start(context.Background()); err != nil {
        panic(err)
    }
    
    // ... subsequent operations
}

πŸ“š Framework Structure


πŸ”§ Advanced Configuration


πŸ“– Documentation

Visit our Wiki for detailed documentation:

🀝 Contributing

We welcome all contributions! If you'd like to contribute to DaoFrame:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

For more details, please refer to CONTRIBUTING.md

πŸ“„ License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details

πŸ™ Acknowledgments

Thanks to all the developers who have contributed to this project!

πŸ“¬ Contact

🎯 Roadmap

  • Distributed Transaction Support
  • Cloud-Native Adaptation
  • WebAssembly Support
  • More Middleware Integration

Directories ΒΆ

Path Synopsis
api/context.go
api/context.go
config/loader.go
config/loader.go
discovery/balancer.go
discovery/balancer.go
errors/chain.go
errors/chain.go
event/bus.go
event/bus.go
metrics/aggregator.go
metrics/aggregator.go
plugin/container.go
plugin/container.go
security/access.go
security/access.go
storage/manager.go
storage/manager.go
system/monitor.go
system/monitor.go
async
tools/async/pool.go
tools/async/pool.go
cache
tools/cache/cache.go
tools/cache/cache.go
common
tools/common/types.go
tools/common/types.go
config
tools/config/config.go
tools/config/config.go
logger
tools/logger/logger.go
tools/logger/logger.go
scheduler
tools/scheduler/scheduler.go
tools/scheduler/scheduler.go

Jump to

Keyboard shortcuts

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