mark pubsub type safe via generics (#15961)

This commit is contained in:
Klaus Post
2022-10-28 19:55:42 +02:00
committed by GitHub
parent 6d22e74d11
commit 71954faa3a
11 changed files with 91 additions and 105 deletions

View File

@@ -27,7 +27,8 @@ import (
"time"
"github.com/minio/console/restapi"
minio "github.com/minio/minio-go/v7"
"github.com/minio/madmin-go"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/set"
"github.com/minio/minio/internal/bucket/bandwidth"
"github.com/minio/minio/internal/config"
@@ -220,11 +221,10 @@ var (
// global Trace system to send HTTP request/response
// and Storage/OS calls info to registered listeners.
globalTrace = pubsub.New(8)
globalTrace = pubsub.New[madmin.TraceInfo, madmin.TraceType](8)
// global Listen system to send S3 API events to registered listeners
// Objects are expected to be event.Event
globalHTTPListen = pubsub.New(0)
globalHTTPListen = pubsub.New[event.Event, pubsub.Mask](0)
// global console system to send console logs to
// registered listeners