Debian Codegraph @

exporter/exporterhelper/internal/queuebatch/encoding.go

raw symbols SCIP
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package queuebatch // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal/queuebatch"
5
6 import "context"
7
8 // encoding defines the encoding to be used if persistent queue is configured.
9 // Duplicate definition with exporterhelper.QueueBatchEncoding since aliasing generics is not supported by default.
10 type encoding[T any] interface {
11 // Marshal is a function that can marshal a request and its context into bytes.
12 Marshal(context.Context, T) ([]byte, error)
13
14 // Unmarshal is a function that can unmarshal bytes into a request and its context.
15 Unmarshal([]byte) (context.Context, T, error)
16 }