Vendor dependencies

This commit is contained in:
dwrz
2026-10-24 02:44:51 +00:00
parent ffb1e9a952
commit a577d3ff2d
1214 changed files with 315519 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package middleware
type eventStreamOutputKey struct{}
func AddEventStreamOutputToMetadata(metadata *Metadata, output any) {
metadata.Set(eventStreamOutputKey{}, output)
}
func GetEventStreamOutputToMetadata[T any](metadata *Metadata) (*T, bool) {
val := metadata.Get(eventStreamOutputKey{})
// not found
if val == nil {
return nil, false
}
// wrong type
res, ok := val.(*T)
if !ok {
return nil, false
}
return res, true
}