func New( maxRetainedLogMessages uint32, skipCertVerify bool, blackListManager *blacklist.URLBlacklistManager, logger *gosteno.Logger, messageDrainBufferSize uint, dropsondeOrigin string, sinkTimeout, sinkIOTimeout, metricTTL, dialTimeout time.Duration, ) *SinkManager { return &SinkManager{ doneChannel: make(chan struct{}), errorChannel: make(chan *events.Envelope, 100), urlBlacklistManager: blackListManager, sinks: groupedsinks.NewGroupedSinks(logger), skipCertVerify: skipCertVerify, recentLogCount: maxRetainedLogMessages, metrics: metrics.NewSinkManagerMetrics(), logger: logger, messageDrainBufferSize: messageDrainBufferSize, dropsondeOrigin: dropsondeOrigin, sinkTimeout: sinkTimeout, sinkIOTimeout: sinkIOTimeout, metricTTL: metricTTL, dialTimeout: dialTimeout, grpcStreams: newGRPCRegistry(), grpcFirehoses: newGRPCRegistry(), } }
func New(maxRetainedLogMessages uint32, skipCertVerify bool, blackListManager *blacklist.URLBlacklistManager, logger *gosteno.Logger, dropsondeOrigin string, sinkTimeout, metricTTL time.Duration) *SinkManager { sinkDropUpdateChannel := make(chan int64) return &SinkManager{ doneChannel: make(chan struct{}), errorChannel: make(chan *events.Envelope, 100), urlBlacklistManager: blackListManager, sinks: groupedsinks.NewGroupedSinks(logger), skipCertVerify: skipCertVerify, recentLogCount: maxRetainedLogMessages, metrics: metrics.NewSinkManagerMetrics(sinkDropUpdateChannel), sinkDropUpdateChannel: sinkDropUpdateChannel, logger: logger, dropsondeOrigin: dropsondeOrigin, sinkTimeout: sinkTimeout, metricTTL: metricTTL, } }