go format code changes
This commit is contained in:
parent
c2e2725855
commit
d400d33b1e
@ -381,9 +381,9 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
|
|||||||
allowTopics = append(allowTopics, drandTopics...)
|
allowTopics = append(allowTopics, drandTopics...)
|
||||||
options = append(options,
|
options = append(options,
|
||||||
pubsub.WithSubscriptionFilter(
|
pubsub.WithSubscriptionFilter(
|
||||||
pubsub.WrapLimitSubscriptionFilter(
|
pubsub.WrapLimitSubscriptionFilter(
|
||||||
pubsub.NewAllowlistSubscriptionFilter(allowTopics...),
|
pubsub.NewAllowlistSubscriptionFilter(allowTopics...),
|
||||||
100)))
|
100)))
|
||||||
|
|
||||||
var transports []tracer.TracerTransport
|
var transports []tracer.TracerTransport
|
||||||
if in.Cfg.JsonTracer != "" {
|
if in.Cfg.JsonTracer != "" {
|
||||||
@ -505,7 +505,7 @@ func (trw *tracerWrapper) Trace(evt *pubsub_pb.TraceEvent) {
|
|||||||
|
|
||||||
case pubsub_pb.TraceEvent_DELIVER_MESSAGE:
|
case pubsub_pb.TraceEvent_DELIVER_MESSAGE:
|
||||||
stats.Record(context.TODO(), metrics.PubsubDeliverMessage.M(1))
|
stats.Record(context.TODO(), metrics.PubsubDeliverMessage.M(1))
|
||||||
|
|
||||||
case pubsub_pb.TraceEvent_REJECT_MESSAGE:
|
case pubsub_pb.TraceEvent_REJECT_MESSAGE:
|
||||||
stats.Record(context.TODO(), metrics.PubsubRejectMessage.M(1))
|
stats.Record(context.TODO(), metrics.PubsubRejectMessage.M(1))
|
||||||
if trw.traceMessage(evt.GetRejectMessage().GetTopic()) {
|
if trw.traceMessage(evt.GetRejectMessage().GetTopic()) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package tracer
|
package tracer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ func (t *FastHttpTransport) copyResponse(dst *http.Response, src *fasthttp.Respo
|
|||||||
|
|
||||||
// Cast to a string to make a copy seeing as src.Body() won't
|
// Cast to a string to make a copy seeing as src.Body() won't
|
||||||
// be valid after the response is released back to the pool (fasthttp.ReleaseResponse).
|
// be valid after the response is released back to the pool (fasthttp.ReleaseResponse).
|
||||||
dst.Body = ioutil.NopCloser(strings.NewReader(string(src.Body())))
|
dst.Body = io.NopCloser(strings.NewReader(string(src.Body())))
|
||||||
|
|
||||||
return dst
|
return dst
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user