resolve conflict
This commit is contained in:
parent
7c5da60556
commit
1ba02ed8ad
@ -10,7 +10,6 @@ linters:
|
||||
- unused
|
||||
- gosimple
|
||||
- govet
|
||||
- goimports
|
||||
- prealloc
|
||||
- unconvert
|
||||
- nakedret
|
||||
|
3
event.go
3
event.go
@ -10,11 +10,10 @@ import (
|
||||
type event struct {
|
||||
msg *broker.Message
|
||||
err error
|
||||
ctx context.Context
|
||||
|
||||
topic string
|
||||
|
||||
ctx context.Context
|
||||
|
||||
sync.RWMutex
|
||||
ack bool
|
||||
}
|
||||
|
10
kgo.go
10
kgo.go
@ -57,16 +57,16 @@ var DefaultRetryBackoffFn = func() func(int) time.Duration {
|
||||
}()
|
||||
|
||||
type Broker struct {
|
||||
c *kgo.Client
|
||||
c *kgo.Client
|
||||
connected *atomic.Uint32
|
||||
|
||||
kopts []kgo.Opt
|
||||
subs []*subscriber
|
||||
subs []*Subscriber
|
||||
|
||||
opts broker.Options
|
||||
|
||||
sync.RWMutex
|
||||
init bool
|
||||
init bool
|
||||
}
|
||||
|
||||
func (r *Broker) Live() bool {
|
||||
@ -305,7 +305,7 @@ func (k *Broker) publish(ctx context.Context, msgs []*broker.Message, opts ...br
|
||||
k.opts.Meter.Summary(semconv.PublishMessageLatencyMicroseconds, "endpoint", rec.Topic, "topic", rec.Topic).Update(te.Seconds())
|
||||
k.opts.Meter.Histogram(semconv.PublishMessageDurationSeconds, "endpoint", rec.Topic, "topic", rec.Topic).Update(te.Seconds())
|
||||
// if err != nil {
|
||||
k.opts.Meter.Counter(semconv.PublishMessageTotal, "endpoint", rec.Topic, "topic", rec.Topic, "status", "failure").Inc()
|
||||
k.opts.Meter.Counter(semconv.PublishMessageTotal, "endpoint", rec.Topic, "topic", rec.Topic, "status", "failure").Inc()
|
||||
// } else {
|
||||
k.opts.Meter.Counter(semconv.PublishMessageTotal, "endpoint", rec.Topic, "topic", rec.Topic, "status", "success").Inc()
|
||||
// }
|
||||
@ -325,7 +325,7 @@ func (k *Broker) publish(ctx context.Context, msgs []*broker.Message, opts ...br
|
||||
k.opts.Meter.Counter(semconv.PublishMessageTotal, "endpoint", result.Record.Topic, "topic", result.Record.Topic, "status", "failure").Inc()
|
||||
errs = append(errs, result.Err.Error())
|
||||
} // else {
|
||||
k.opts.Meter.Counter(semconv.PublishMessageTotal, "endpoint", result.Record.Topic, "topic", result.Record.Topic, "status", "success").Inc()
|
||||
k.opts.Meter.Counter(semconv.PublishMessageTotal, "endpoint", result.Record.Topic, "topic", result.Record.Topic, "status", "success").Inc()
|
||||
// }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user