mirror of
https://github.com/go-micro/go-micro.git
synced 2025-11-23 21:44:41 +02:00
Docs (#2779)
* add docs layout * update all to use _layouts * update the styling
This commit is contained in:
@@ -1,26 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
Here's a minimal Go Micro service demonstrating the architecture:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"go-micro.dev/v5"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
service := micro.NewService(
|
||||
micro.Name("example"),
|
||||
)
|
||||
service.Init()
|
||||
if err := service.Run(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
```
|
||||
## Architecture
|
||||
|
||||
An overview of the Go Micro architecture
|
||||
@@ -63,3 +44,26 @@ in the plugins repo. State and persistence becomes a core requirement beyond pro
|
||||
## Design
|
||||
|
||||
We will share more on architecture soon
|
||||
|
||||
## Example Usage
|
||||
|
||||
Here's a minimal Go Micro service demonstrating the architecture:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"go-micro.dev/v5"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
service := micro.NewService(
|
||||
micro.Name("example"),
|
||||
)
|
||||
service.Init()
|
||||
if err := service.Run(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Broker
|
||||
|
||||
The broker provides pub/sub messaging for Go Micro services.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Client/Server
|
||||
|
||||
Go Micro uses a client/server model for RPC communication between services.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Getting Started
|
||||
|
||||
To make use of Go Micro
|
||||
@@ -117,15 +121,15 @@ package greeter;
|
||||
option go_package = "/proto;helloworld";
|
||||
|
||||
service Say {
|
||||
rpc Hello(Request) returns (Response) {}
|
||||
rpc Hello(Request) returns (Response) {}
|
||||
}
|
||||
|
||||
message Request {
|
||||
string name = 1;
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message Response {
|
||||
string message = 1;
|
||||
string message = 1;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Docs
|
||||
|
||||
Documentation for the Go Micro framework
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Registry
|
||||
|
||||
The registry is responsible for service discovery in Go Micro. It allows services to register themselves and discover other services.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Store
|
||||
|
||||
The store provides a pluggable interface for data storage in Go Micro.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Transport
|
||||
|
||||
The transport layer is responsible for communication between services.
|
||||
|
||||
Reference in New Issue
Block a user