Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TranslateLogEntry ¶ added in v0.94.0
func TranslateLogEntry(_ context.Context, _ *zap.Logger, data []byte) (pcommon.Resource, plog.LogRecord, error)
TranslateLogEntry translates a JSON-encoded LogEntry message into a pair of pcommon.Resource and plog.LogRecord, trying to keep as close as possible to the semantic conventions.
For maximum fidelity, the decoding is done according to the protobuf message schema; this ensures that a numeric value in the input is correctly translated to either an integer or a double in the output. It falls back to plain JSON decoding if payload type is not available in the proto registry.
Types ¶
type StreamHandler ¶
type StreamHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler( ctx context.Context, logger *zap.Logger, client *pubsub.SubscriberClient, clientID string, subscription string, callback func(ctx context.Context, message *pubsubpb.ReceivedMessage) error, ) (*StreamHandler, error)
func (*StreamHandler) CancelNow ¶
func (handler *StreamHandler) CancelNow()
func (*StreamHandler) RecoverableStream ¶
func (handler *StreamHandler) RecoverableStream(ctx context.Context)
func (*StreamHandler) Wait ¶
func (handler *StreamHandler) Wait()
Click to show internal directories.
Click to hide internal directories.