Skip to content

Commit 8394909

Browse files
authored
chore(xcap): remove duplicate proto file (#19955)
1 parent f16d8d9 commit 8394909

File tree

7 files changed

+619
-3858
lines changed

7 files changed

+619
-3858
lines changed

pkg/xcap/capture.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import (
1919

2020
"github.com/gogo/protobuf/proto"
2121
"go.opentelemetry.io/otel/attribute"
22+
23+
internal "github.com/grafana/loki/v3/pkg/xcap/internal/proto"
2224
)
2325

2426
// Capture captures statistical information about the lifetime of a query.
@@ -168,7 +170,7 @@ func (c *Capture) MarshalBinary() ([]byte, error) {
168170
return nil, nil
169171
}
170172

171-
protoCapture, err := ToProtoCapture(c)
173+
protoCapture, err := toProtoCapture(c)
172174
if err != nil {
173175
return nil, fmt.Errorf("failed to convert capture to proto: %w", err)
174176
}
@@ -192,12 +194,12 @@ func (c *Capture) UnmarshalBinary(data []byte) error {
192194
return nil
193195
}
194196

195-
protoCapture := &ProtoCapture{}
197+
protoCapture := &internal.Capture{}
196198
if err := proto.Unmarshal(data, protoCapture); err != nil {
197199
return fmt.Errorf("failed to unmarshal proto capture: %w", err)
198200
}
199201

200-
err := FromProtoCapture(protoCapture, c)
202+
err := fromProtoCapture(protoCapture, c)
201203
if err != nil {
202204
return fmt.Errorf("failed to convert proto to capture: %w", err)
203205
}

0 commit comments

Comments
 (0)