Help us shape the future of Go! Take the 2026 Go Developer Survey

todo

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBulkResponseEntry

func AddBulkResponseEntry(bulkResponses *[]contribpubsub.BulkSubscribeResponseEntry, entryId string, err error)

func EndSpans

func EndSpans(spans []trace.Span)

func PopulateAllBulkResponsesWithError

func PopulateAllBulkResponsesWithError(bulkMsg *contribpubsub.BulkMessage,
	bulkResponses *[]contribpubsub.BulkSubscribeResponseEntry, err error,
)

func PopulateBulkSubcribedMessage

func PopulateBulkSubcribedMessage(msgE *contribpubsub.BulkMessageEntry, event any,
	routePathBulkMessageMap *map[string]BulkSubscribedMessage,
	rPath string, i int, msg *contribpubsub.BulkMessage, isCloudEvent bool, psName string, contentType string, namespacedConsumer bool, namespace string,
)

func PopulateBulkSubscribeResponsesWithError

func PopulateBulkSubscribeResponsesWithError(psm *BulkSubscribedMessage,
	bulkResponses *[]contribpubsub.BulkSubscribeResponseEntry, err error,
)

func ReportBulkSubDiagnostics

func ReportBulkSubDiagnostics(ctx context.Context, topic string, bulkSubDiag *BulkSubIngressDiagnostics)

func SetBulkResponseEntry

func SetBulkResponseEntry(bulkResponses *[]contribpubsub.BulkSubscribeResponseEntry, i int, entryId string, err error)

func ValidateEntryId

func ValidateEntryId(entryId string, i int) error

Types

type BulkSubIngressDiagnostics

type BulkSubIngressDiagnostics struct {
	// contains filtered or unexported fields
}

BulkSubIngressDiagnostics holds diagnostics information for bulk subscribe ingress.

A single instance is shared by every resiliency attempt of one bulk delivery. When a policy timeout fires, the resiliency runner abandons the in-flight attempt and starts the next one straight away, so an abandoned attempt can still be recording its outcome while the attempt that replaced it records its own. Access is guarded by a lock so those overlapping writes are safe: without it, the concurrent map writes are liable to abort the process with a fatal error rather than merely lose a count.

func NewBulkSubIngressDiagnostics

func NewBulkSubIngressDiagnostics() *BulkSubIngressDiagnostics

func (*BulkSubIngressDiagnostics) AddStatusCount added in v1.19.0

func (b *BulkSubIngressDiagnostics) AddStatusCount(status contribpubsub.AppResponseStatus, count int64)

AddStatusCount adds count to the number of entries recorded against status.

func (*BulkSubIngressDiagnostics) SetElapsed added in v1.19.0

func (b *BulkSubIngressDiagnostics) SetElapsed(elapsed float64)

SetElapsed records how long the delivery to the app took.

type BulkSubscribeCallData

type BulkSubscribeCallData struct {
	BulkResponses   *[]contribpubsub.BulkSubscribeResponseEntry
	BulkSubDiag     *BulkSubIngressDiagnostics
	EntryIdIndexMap *map[string]int //nolint:stylecheck
	PsName          string
	Topic           string
}

BulkSubscribeCallData holds data for a bulk subscribe call.

type BulkSubscribeResiliencyRes

type BulkSubscribeResiliencyRes struct {
	Entries  []contribpubsub.BulkSubscribeResponseEntry
	Envelope map[string]any
}

type BulkSubscribedMessage

type BulkSubscribedMessage struct {
	PubSubMessages []Message
	Topic          string
	Metadata       map[string]string
	Pubsub         string
	Path           string
	Length         int
}

BulkSubscribedMessage contains all the essential information related to a bulk subscribe message.

type Message

type Message struct {
	CloudEvent map[string]any
	RawData    *pubsub.BulkSubscribeMessageItem
	Entry      *contribpubsub.BulkMessageEntry
}

Message contains all the essential information related to a particular entry. This need to be maintained as a separate struct, as we need to filter out messages and their related info doing retries of resiliency support.

Jump to

Keyboard shortcuts

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