Skip to content

Commit

Permalink
Update go docs of fundamental packages
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Zhao <[email protected]>
  • Loading branch information
sczyh30 committed Nov 26, 2020
1 parent 963192c commit 4c7b620
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions core/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func ResetGlobalConfig(config *Entity) {
globalCfg = config
}

// InitConfigWithYaml loads general configuration from the YAML file under provided path.
func InitConfigWithYaml(filePath string) (err error) {
// Initialize general config and logging module.
if err = applyYamlConfigFile(filePath); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions core/config/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package config provides general configuration mechanism.
package config
2 changes: 2 additions & 0 deletions core/hotspot/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package hotspot provides implementation of "hot-spot" (frequent) parameter flow control.
package hotspot
3 changes: 1 addition & 2 deletions core/isolation/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// Package isolation implements the concurrency traffic control.

// Package isolation provides implementation of concurrency limiting (semaphore isolation).
package isolation
2 changes: 1 addition & 1 deletion core/isolation/slot.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (s *Slot) Check(ctx *base.EntryContext) *base.TokenResult {
return result
}
if passed, rule, snapshot := checkPass(ctx); !passed {
msg := "isolation check blocked"
msg := "concurrency exceeds threshold"
if result == nil {
result = base.NewTokenResultBlockedWithCause(base.BlockTypeIsolation, msg, rule, snapshot)
} else {
Expand Down
2 changes: 2 additions & 0 deletions core/stat/base/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package stat/base provides fundamental data structures of statistics.
package base
2 changes: 2 additions & 0 deletions core/system/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package system provides implementation of adaptive system protection.
package system
2 changes: 2 additions & 0 deletions ext/datasource/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package ext/datasource provides interfaces and helper classes of dynamic data-source.
package datasource

0 comments on commit 4c7b620

Please sign in to comment.