mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
0249afc523
This package was moved to a separate repository, using the steps below:
# install filter-repo (https://github.com/newren/git-filter-repo/blob/main/INSTALL.md)
brew install git-filter-repo
cd ~/projects
# create a temporary clone of docker
git clone https://github.com/docker/docker.git moby_pubsub_temp
cd moby_pubsub_temp
# for reference
git rev-parse HEAD
# --> 572ca799db
# remove all code, except for pkg/pubsub, license, and notice, and rename pkg/pubsub to /
git filter-repo --path pkg/pubsub/ --path LICENSE --path NOTICE --path-rename pkg/pubsub/:
# remove canonical imports
git revert -s -S 585ff0ebbe6bc25b801a0e0087dd5353099cb72e
# initialize module
go mod init github.com/moby/pubsub
go mod tidy
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
17 lines
708 B
Go
17 lines
708 B
Go
package pubsub // import "github.com/docker/docker/pkg/pubsub"
|
|
|
|
import "github.com/moby/pubsub"
|
|
|
|
// NewPublisher creates a new pub/sub publisher to broadcast messages.
|
|
// The duration is used as the send timeout as to not block the publisher publishing
|
|
// messages to other clients if one client is slow or unresponsive.
|
|
// The buffer is used when creating new channels for subscribers.
|
|
//
|
|
// Deprecated: use github.com/moby/pubsub.NewPublisher
|
|
var NewPublisher = pubsub.NewPublisher
|
|
|
|
// Publisher is basic pub/sub structure. Allows to send events and subscribe
|
|
// to them. Can be safely used from multiple goroutines.
|
|
//
|
|
// Deprecated: use github.com/moby/pubsub.Publisher
|
|
type Publisher = pubsub.Publisher
|