Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TranslateLogEntry ¶ added in v0.94.0
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, settings receiver.Settings, telemetryBuilder *metadata.TelemetryBuilder, client 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()
type SubscriberClient ¶ added in v0.118.0
type SubscriberClient interface { Close() error StreamingPull(ctx context.Context, opts ...gax.CallOption) (pubsubpb.Subscriber_StreamingPullClient, error) }
subscriberClient subset of `pubsub.SubscriberClient`
Click to show internal directories.
Click to hide internal directories.