1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-10 21:52:01 +02:00
* add docs layout

* update all to use _layouts

* update the styling
This commit is contained in:
Asim Aslam
2025-05-21 13:48:03 +01:00
committed by GitHub
parent 456cd7e092
commit 788dcd05b2
10 changed files with 91 additions and 25 deletions

View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if page.title %}{{ page.title }} | {% endif %}Go Micro Documentation</title>
<style>
body { font-family: sans-serif; margin: 0; padding: 0; background: #f9f9f9; }
header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 2rem; background: #fff; border-bottom: 1px solid #eee; }
.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-link img { height: 40px; margin-right: 10px; }
nav a { margin-left: 24px; color: #333; text-decoration: none; font-weight: 500; }
nav a:hover { color: #007d9c; }
main { max-width: 800px; margin: 2rem auto; background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
pre { background: whitesmoke; padding: 10px; border-radius: 5px; }
</style>
</head>
<body>
<header>
<a class="logo-link" href="/">
<img src="/images/logo.png" alt="Go Micro Logo">
<span style="font-size: 1.3rem; font-weight: bold; color: #222;">Go Micro</span>
</a>
<nav>
<a href="/docs/">Docs</a>
<a href="https://github.com/micro/go-micro" target="_blank" rel="noopener">GitHub</a>
<a href="/">Home</a>
</nav>
</header>
<main>
{{ content }}
</main>
</body>
</html>

View File

@@ -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)
}
}
```

View File

@@ -1,3 +1,7 @@
---
layout: default
---
# Broker
The broker provides pub/sub messaging for Go Micro services.

View File

@@ -1,3 +1,7 @@
---
layout: default
---
# Client/Server
Go Micro uses a client/server model for RPC communication between services.

View File

@@ -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;
}
```

View File

@@ -1,3 +1,7 @@
---
layout: default
---
# Docs
Documentation for the Go Micro framework

View File

@@ -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.

View File

@@ -1,3 +1,7 @@
---
layout: default
---
# Store
The store provides a pluggable interface for data storage in Go Micro.

View File

@@ -1,3 +1,7 @@
---
layout: default
---
# Transport
The transport layer is responsible for communication between services.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB