mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-02 22:17:10 +08:00
20 lines
377 B
Go
20 lines
377 B
Go
![]() |
// Copyright (c) Mainflux
|
||
|
// SPDX-License-Identifier: Apache-2.0
|
||
|
|
||
|
package mocks
|
||
|
|
||
|
import (
|
||
|
"github.com/mainflux/mainflux/pkg/messaging"
|
||
|
)
|
||
|
|
||
|
type mockPublisher struct{}
|
||
|
|
||
|
// NewPublisher returns mock message publisher.
|
||
|
func NewPublisher() messaging.Publisher {
|
||
|
return mockPublisher{}
|
||
|
}
|
||
|
|
||
|
func (pub mockPublisher) Publish(topic string, msg messaging.Message) error {
|
||
|
return nil
|
||
|
}
|