Documentation
¶
Index ¶
- func AddBulkResponseEntry(bulkResponses *[]contribpubsub.BulkSubscribeResponseEntry, entryId string, ...)
- func EndSpans(spans []trace.Span)
- func PopulateAllBulkResponsesWithError(bulkMsg *contribpubsub.BulkMessage, ...)
- func PopulateBulkSubcribedMessage(msgE *contribpubsub.BulkMessageEntry, event any, ...)
- func PopulateBulkSubscribeResponsesWithError(psm *BulkSubscribedMessage, ...)
- func ReportBulkSubDiagnostics(ctx context.Context, topic string, bulkSubDiag *BulkSubIngressDiagnostics)
- func SetBulkResponseEntry(bulkResponses *[]contribpubsub.BulkSubscribeResponseEntry, i int, ...)
- func ValidateEntryId(entryId string, i int) error
- type BulkSubIngressDiagnostics
- type BulkSubscribeCallData
- type BulkSubscribeResiliencyRes
- type BulkSubscribedMessage
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBulkResponseEntry ¶
func AddBulkResponseEntry(bulkResponses *[]contribpubsub.BulkSubscribeResponseEntry, entryId string, err error)
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 ¶
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.