add observer

This commit is contained in:
ginuerzh
2024-01-03 20:55:06 +08:00
parent e1ae379048
commit c959fc2f73
95 changed files with 2371 additions and 890 deletions

View File

@ -16,6 +16,7 @@ import (
limiter "github.com/go-gost/x/limiter/traffic/wrapper"
metrics "github.com/go-gost/x/metrics/wrapper"
"github.com/go-gost/x/registry"
stats "github.com/go-gost/x/stats/wrapper"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/keepalive"
@ -66,6 +67,7 @@ func (l *grpcListener) Init(md md.Metadata) (err error) {
}
ln = proxyproto.WrapListener(l.options.ProxyProtocol, ln, 10*time.Second)
ln = metrics.WrapListener(l.options.Service, ln)
ln = stats.WrapListener(ln, l.options.Stats)
ln = admission.WrapListener(l.options.Admission, ln)
ln = limiter.WrapListener(l.options.TrafficLimiter, ln)
ln = climiter.WrapListener(l.options.ConnLimiter, ln)