linux/shim: use events.Publisher interface

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-07-31 13:27:45 -07:00
parent 92d737f4ae
commit 7ed88c1e36
4 changed files with 54 additions and 60 deletions

View File

@@ -150,9 +150,9 @@ func WithConnect(ctx context.Context, config Config) (shim.ShimClient, io.Closer
}
// WithLocal uses an in process shim
func WithLocal(events *events.Exchange) func(context.Context, Config) (shim.ShimClient, io.Closer, error) {
func WithLocal(publisher events.Publisher) func(context.Context, Config) (shim.ShimClient, io.Closer, error) {
return func(ctx context.Context, config Config) (shim.ShimClient, io.Closer, error) {
service, err := NewService(config.Path, config.Namespace, &localEventsClient{publisher: events})
service, err := NewService(config.Path, config.Namespace, publisher)
if err != nil {
return nil, nil, err
}