|
| 1 | +# Mikros |
| 2 | + |
| 3 | +<p align="center"> |
| 4 | + <img src="https://avatars.githubusercontent.com/u/146955355" alt="Mikros Logo" width="200"> |
| 5 | +</p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + <strong>Service Orchestration Made Simple</strong> |
| 9 | +</p> |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | + A lightweight microservices framework for modern applications |
| 13 | +</p> |
| 14 | + |
| 15 | +<p align="center"> |
| 16 | + <a href="https://github.com/mikros-dev/mikros/blob/main/LICENSE"> |
| 17 | + <img src="https://img.shields.io/github/license/mikros-dev/mikros" alt="License"> |
| 18 | + </a> |
| 19 | + <a href="https://github.com/mikros-dev/mikros/releases"> |
| 20 | + <img src="https://img.shields.io/github/v/release/mikros-dev/mikros" alt="Latest Release"> |
| 21 | + </a> |
| 22 | + <a href="https://github.com/mikros-dev/mikros/stargazers"> |
| 23 | + <img src="https://img.shields.io/github/stars/mikros-dev/mikros" alt="GitHub stars"> |
| 24 | + </a> |
| 25 | +</p> |
| 26 | + |
| 27 | +## Overview |
| 28 | + |
| 29 | +Mikros is an API built to facilitate and standardize the creation of applications that need to run for an indefinite period, typically running continuously, performing specific operations. It serves as an SDK that simplifies microservices development, providing a consistent approach to building and deploying services. |
| 30 | + |
| 31 | +### Key Features |
| 32 | + |
| 33 | +- **🚀 Easy Deployment** - Deploy your microservices with a single command. Mikros handles the complexity so you can focus on building your application. |
| 34 | +- **🔌 Service Discovery** - Automatic service discovery and registration. No need to manually configure service connections. |
| 35 | +- **🔒 Built-in Security** - Secure communication between services with built-in authentication and encryption. |
| 36 | +- **🔄 Load Balancing** - Intelligent load balancing ensures optimal resource utilization and high availability. |
| 37 | +- **📊 Monitoring & Observability** - Comprehensive monitoring tools provide insights into your microservices ecosystem. |
| 38 | +- **⚡ High Performance** - Designed for speed and efficiency, Mikros minimizes overhead to maximize your application's performance. |
| 39 | + |
| 40 | +## Service Types |
| 41 | + |
| 42 | +Mikros supports the following service types: |
| 43 | + |
| 44 | +- **gRPC Services**: Applications with APIs defined from a **protobuf** file. |
| 45 | +- **HTTP Services**: HTTP server applications with APIs defined from a **protobuf** file. |
| 46 | +- **Native Services**: General-purpose applications without a defined API, with the flexibility to execute any code. |
| 47 | + |
| 48 | +## Getting Started |
| 49 | + |
| 50 | +### Prerequisites |
| 51 | + |
| 52 | +- Go 1.18+ |
| 53 | +- Basic understanding of microservices architecture |
| 54 | + |
| 55 | +### Installation |
| 56 | + |
| 57 | +```bash |
| 58 | +go get github.com/mikros-dev/mikros |
| 59 | +``` |
| 60 | + |
| 61 | +### Basic Usage |
| 62 | + |
| 63 | +Create a simple gRPC service: |
| 64 | + |
| 65 | +```go |
| 66 | +package main |
| 67 | + |
| 68 | +import ( |
| 69 | + "context" |
| 70 | + |
| 71 | + "github.com/mikros-dev/mikros/v2" |
| 72 | + "github.com/mikros-dev/mikros/v2/components/options" |
| 73 | +) |
| 74 | + |
| 75 | +type server struct { |
| 76 | + *mikros.Service |
| 77 | +} |
| 78 | + |
| 79 | +func (s *server) YourMethod(ctx context.Context, req *yourpb.Request) (*yourpb.Response, error) { |
| 80 | + // Your implementation here |
| 81 | + return &yourpb.Response{}, nil |
| 82 | +} |
| 83 | + |
| 84 | +func main() { |
| 85 | + svc := mikros.NewService(&mikros.ServiceOptions{ |
| 86 | + Service: map[string]options.ServiceOptions{ |
| 87 | + "grpc": &options.GrpcServiceOptions{ |
| 88 | + ProtoServiceDescription: &yourpb.YourService_ServiceDesc, |
| 89 | + }, |
| 90 | + }, |
| 91 | + }) |
| 92 | + |
| 93 | + svc.Start(&server{}) |
| 94 | +} |
| 95 | +``` |
| 96 | + |
| 97 | +### Configuration |
| 98 | + |
| 99 | +Mikros uses a `service.toml` file for configuration. Example: |
| 100 | + |
| 101 | +```toml |
| 102 | +name = "your-service" |
| 103 | +type = "grpc" |
| 104 | +version = "v0.1.0" |
| 105 | +language = "go" |
| 106 | +product = "your-product" |
| 107 | + |
| 108 | +[features.tracing] |
| 109 | +enabled = true |
| 110 | +``` |
| 111 | + |
| 112 | +## Documentation |
| 113 | + |
| 114 | +For complete documentation, visit our [official documentation site](https://mikros-dev.github.io/mikros-docs/). |
| 115 | + |
| 116 | +Available in: |
| 117 | +- [English](https://mikros-dev.github.io/mikros-docs/) |
| 118 | +- [Portuguese](https://mikros-dev.github.io/mikros-docs/pt/) |
| 119 | + |
| 120 | +## Contributing |
| 121 | + |
| 122 | +We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details. |
| 123 | + |
| 124 | +## License |
| 125 | + |
| 126 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 127 | + |
| 128 | +## Acknowledgments |
| 129 | + |
| 130 | +- The Mikros team and all contributors |
| 131 | +- The open-source community for their invaluable tools and libraries |
| 132 | + |
| 133 | +--- |
| 134 | + |
| 135 | +<p align="center">Built with ❤️ by the Mikros team</p> |
0 commit comments