MCPcopy
hub / github.com/alibaba/sentinel-golang

github.com/alibaba/sentinel-golang @v1.0.4 sqlite

repository ↗ · DeepWiki ↗ · release v1.0.4 ↗
1,729 symbols 6,188 edges 227 files 444 documented · 26%
README
<img src="https://user-images.githubusercontent.com/9434884/43697219-3cb4ef3a-9975-11e8-9a9c-73f4f537442d.png" alt="Sentinel Logo" width="50%">

Sentinel: The Sentinel of Your Microservices

CI Build Status codecov Go Report Card License Gitter GitHub last commit GitHub repo size GitHub closed issues

Introduction

As distributed systems become increasingly popular, the reliability between services is becoming more important than ever before. Sentinel takes "flow" as breakthrough point, and works on multiple fields including flow control, circuit breaking and system adaptive protection, to guarantee reliability and resiliency of microservices.

flow-overview

Sentinel provides the following features:

  • Rich applicable scenarios: Sentinel has been wildly used in Alibaba, and has covered almost all the core-scenarios in Double-11 (11.11) Shopping Festivals in the past 10 years, such as “Second Kill” which needs to limit burst flow traffic to meet the system capacity, throttling, circuit breaking for unreliable downstream services, distributed rate limiting, etc.
  • Real-time monitoring: Sentinel also provides real-time monitoring ability. You can see the runtime information of a single machine in real-time, and pump the metrics to outside metric components like Prometheus.
  • Cloud-native ecosystem: Sentinel Go provides out-of-box integrations with cloud-native components.

Documentation

See the 中文文档 for document in Chinese.

See the Wiki for full documentation, examples, blog posts, and other information.

If you are using Sentinel, please leave a comment here to tell us your scenario to make Sentinel better. It's also encouraged to add the link of your blog post, tutorial, demo or customized components to Awesome Sentinel.

Sub-projects

All integration modules and sub-projects are located in sentinel-group.

Bugs and Feedback

For bug report, questions and discussions please submit GitHub Issues.

Contributing

Contributions are always welcomed! Please see CONTRIBUTING for detailed guidelines.

You can start with the issues labeled with good first issue.

Communication

  • DingTalk Group (钉钉群): 23339422
  • Gitter

Extension points exported contracts — how you extend this code

RuleCheckSlot (Interface)
RuleCheckSlot is rule based checking strategy All checking rule must implement this interface. [10 implementers]
core/base/slot_chain.go
StateChangeListener (Interface)
StateChangeListener listens on the circuit breaker state change event [5 implementers]
core/circuitbreaker/circuit_breaker.go
Counter (Interface)
Counter is a Metric that represents a single numerical value that only ever goes up. [5 implementers]
exporter/metric/exporter.go
BucketGenerator (Interface)
Generic interface to generate bucket [4 implementers]
core/stat/base/leap_array.go
TrafficShapingCalculator (Interface)
TrafficShapingCalculator calculates the actual traffic shaping threshold based on the threshold of rule and the traffic [3 …
core/flow/traffic_shaping.go
ConcurrentCounterCache (Interface)
ConcurrentCounterCache cache the hotspot parameter [3 implementers]
core/hotspot/cache/concurrent_cache.go
TestService (Interface)
Client API for Test service [3 implementers]
pkg/adapters/micro/test/test.pb.micro.go
MetricLogWriter (Interface)
MetricLogWriter writes and flushes metric items to current metric log. [2 implementers]
core/log/metric/common.go

Core symbols most depended-on inside this repo

Run
called by 271
pkg/datasource/k8s/k8s.go
Error
called by 119
logging/logging.go
Error
called by 95
logging/logging.go
Sleep
called by 69
util/time.go
Exit
called by 66
core/base/entry.go
Entry
called by 56
core/base/slot_chain.go
Info
called by 55
logging/logging.go
CurrentTimeMillis
called by 53
util/time.go

Shape

Function 761
Method 691
Struct 201
Interface 35
TypeAlias 23
FuncType 18

Languages

Go100%

Modules by API surface

core/circuitbreaker/circuit_breaker.go63 symbols
pkg/datasource/k8s/api/v1alpha1/zz_generated.deepcopy.go62 symbols
util/time.go52 symbols
logging/logging.go36 symbols
core/base/slot_chain_test.go34 symbols
core/config/entity.go31 symbols
exporter/metric/exporter.go29 symbols
core/config/config.go29 symbols
core/base/stat.go28 symbols
tests/benchmark/entry/entry_comparison_benchmark_test.go25 symbols
core/base/result.go24 symbols
core/flow/rule_manager.go23 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

github.com/StackExchange/wmiv0.0.0-2019052321331 · 1×
github.com/apolloconfig/agollo/v4v4.0.9 · 1×
github.com/coreos/bboltv1.3.4 · 1×
github.com/coreos/etcdv3.3.25+incompatible · 1×
github.com/coreos/go-semverv0.3.0 · 1×
github.com/coreos/pkgv0.0.0-2018092819010 · 1×
github.com/dustin/go-humanizev1.0.0 · 1×
github.com/fsnotify/fsnotifyv1.4.7 · 1×
github.com/go-logr/logrv0.1.0 · 1×
github.com/go-ole/go-olev1.2.4 · 1×

For agents

$ claude mcp add sentinel-golang \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact