File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ This package provides Sentinel integration for go-micro.
3
+
4
+ For server side, users may append a Sentinel handler wrapper to go-micro service, like:
5
+
6
+ import (
7
+ sentinelPlugin "github.com/alibaba/sentinel-golang/adapter/micro"
8
+ )
9
+
10
+ // Append a Sentinel handler wrapper.
11
+ micro.NewService(micro.WrapHandler(sentinelPlugin.NewHandlerWrapper()))
12
+
13
+ The plugin extracts service method as the resource name by default.
14
+ Users may provide customized resource name extractor when creating new
15
+ Sentinel handler wrapper (via options).
16
+
17
+ Fallback logic: the plugin will return the BlockError by default
18
+ if current request is blocked by Sentinel rules. Users may also
19
+ provide customized fallback logic via WithXxxBlockFallback(handler) options.
20
+ */
21
+ package micro
Original file line number Diff line number Diff line change
1
+ // Package api provides fundamental APIs of Sentinel.
1
2
package api
2
3
3
4
import (
You can’t perform that action at this time.
0 commit comments