tdbgtest

package
v1.23.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCliApp

func NewCliApp(opts ...tdbg.Option) *cli.App

NewCliApp is a wrapper around tdbg.NewCliApp that sets the cli.App.ExitErrHandler to a no-op function.

func ParseJSONL

func ParseJSONL[T any](file io.Reader, decodeNext func(decoder *json.Decoder) (T, error)) ([]T, error)

ParseJSONL parses a JSONL file. We separate this out from ParseDLQMessages so that we can reuse it for other JSONL files that don't contain tdbg.DLQMessage objects (i.e. when tdbg.DLQV1Service is used).

Types

type DLQMessage

type DLQMessage[T proto.Message] struct {
	MessageID int64
	ShardID   int32
	Payload   T
}

DLQMessage is a parsed version of tdbg.DLQMessage, where the payload is a deserialized proto.Message.

func ParseDLQMessages

func ParseDLQMessages[T proto.Message](file io.Reader, newMessage func() T) ([]DLQMessage[T], error)

ParseDLQMessages parses a JSONL file containing serialized tdbg.DLQMessage objects.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL