Skip to content

Commit b3f49c4

Browse files
committed
docs: update docs
1 parent 8aff7d0 commit b3f49c4

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ func (c *Component) Init() {
5656
- Provides [scaffolding tool gonectl](https://github.com/gone-io/gonectl) supporting project creation, component management, code generation, test mocking, compilation and running.
5757

5858
### Architecture
59-
<img src="docs/assert/architecture.png" width = "600" alt="architecture"/>
59+
<img src="docs/assert/architecture.png" width = "800" alt="architecture"/>
6060

61-
### Lifecycle
62-
<img src="docs/assert/flow.png" width = "600" alt="flow"/>
6361

6462
## 🏁 Quick Start
6563

README_CN.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ func (c *Component) Init() {
5757
### 架构
5858
<img src="docs/assert/architecture.png" width = "600" alt="architecture"/>
5959

60-
### 生命周期
61-
<img src="docs/assert/flow.png" width = "600" alt="flow"/>
60+
6261

6362
## 🏁 快速开始
6463

config.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,18 @@ type Configure interface {
1818
Get(key string, v any, defaultVal string) error
1919
}
2020

21+
// ConfWatchFunc defines the callback function for configuration changes
22+
type ConfWatchFunc func(oldVal, newVal any)
23+
24+
// DynamicConfigure defines the interface for dynamic configuration providers
2125
type DynamicConfigure interface {
2226
Configure
27+
28+
// Notify registers a callback function to be called when the specified key changes
2329
Notify(key string, callback ConfWatchFunc)
2430
}
2531

26-
type ConfWatchFunc func(oldVal, newVal any)
27-
32+
// ConfWatcher which can be injected, to register a callback function to be called when the specified key changes
2833
type ConfWatcher func(key string, callback ConfWatchFunc)
2934

3035
type confWatcherProvider struct {

docs/assert/architecture.png

-184 KB
Loading

logger.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const (
1313
ErrorLevel LoggerLevel = 2
1414
)
1515

16+
// Logger Interface which can be injected and provided by gone framework core
1617
type Logger interface {
1718
Infof(msg string, args ...any)
1819
Errorf(msg string, args ...any)

0 commit comments

Comments
 (0)