diff --git a/core/config/config.go b/core/config/config.go index 8fc6aaa33..a9cccf036 100644 --- a/core/config/config.go +++ b/core/config/config.go @@ -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 { diff --git a/core/config/doc.go b/core/config/doc.go new file mode 100644 index 000000000..e8b671e61 --- /dev/null +++ b/core/config/doc.go @@ -0,0 +1,2 @@ +// Package config provides general configuration mechanism. +package config diff --git a/core/hotspot/doc.go b/core/hotspot/doc.go new file mode 100644 index 000000000..b5da1dfeb --- /dev/null +++ b/core/hotspot/doc.go @@ -0,0 +1,2 @@ +// Package hotspot provides implementation of "hot-spot" (frequent) parameter flow control. +package hotspot diff --git a/core/isolation/doc.go b/core/isolation/doc.go index bb706260a..d4ef5836b 100644 --- a/core/isolation/doc.go +++ b/core/isolation/doc.go @@ -1,3 +1,2 @@ -// Package isolation implements the concurrency traffic control. - +// Package isolation provides implementation of concurrency limiting (semaphore isolation). package isolation diff --git a/core/isolation/slot.go b/core/isolation/slot.go index d02940e79..0f4e7d6e6 100644 --- a/core/isolation/slot.go +++ b/core/isolation/slot.go @@ -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 { diff --git a/core/stat/base/doc.go b/core/stat/base/doc.go new file mode 100644 index 000000000..a6dc7a88d --- /dev/null +++ b/core/stat/base/doc.go @@ -0,0 +1,2 @@ +// Package stat/base provides fundamental data structures of statistics. +package base diff --git a/core/system/doc.go b/core/system/doc.go new file mode 100644 index 000000000..a49b881b8 --- /dev/null +++ b/core/system/doc.go @@ -0,0 +1,2 @@ +// Package system provides implementation of adaptive system protection. +package system diff --git a/ext/datasource/doc.go b/ext/datasource/doc.go new file mode 100644 index 000000000..6bebeaef2 --- /dev/null +++ b/ext/datasource/doc.go @@ -0,0 +1,2 @@ +// Package ext/datasource provides interfaces and helper classes of dynamic data-source. +package datasource