github.com/rumpl/bof@v23.0.0-rc.2+incompatible/pkg/pubsub/publisher.go (about)

     1  package pubsub // import "github.com/docker/docker/pkg/pubsub"
     2  
     3  import "github.com/moby/pubsub"
     4  
     5  // NewPublisher creates a new pub/sub publisher to broadcast messages.
     6  // The duration is used as the send timeout as to not block the publisher publishing
     7  // messages to other clients if one client is slow or unresponsive.
     8  // The buffer is used when creating new channels for subscribers.
     9  //
    10  // Deprecated: use github.com/moby/pubsub.NewPublisher
    11  var NewPublisher = pubsub.NewPublisher
    12  
    13  // Publisher is basic pub/sub structure. Allows to send events and subscribe
    14  // to them. Can be safely used from multiple goroutines.
    15  //
    16  // Deprecated: use github.com/moby/pubsub.Publisher
    17  type Publisher = pubsub.Publisher