mirror of
https://github.com/eosswedenorg/thalos
synced 2026-07-04 12:03:41 +02:00
Adding transport/publisher.go
This commit is contained in:
parent
3251c94416
commit
6b6a375228
1 changed files with 13 additions and 0 deletions
13
transport/publisher.go
Normal file
13
transport/publisher.go
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
package transport
|
||||||
|
|
||||||
|
// Publisher interface defines the required methods
|
||||||
|
// to send messages over channel.
|
||||||
|
type Publisher interface {
|
||||||
|
// Publish a message to a channel.
|
||||||
|
// The message may or may not be buffered depending on the implementation.
|
||||||
|
Publish(channel string, payload []byte) error
|
||||||
|
|
||||||
|
// Flush writes any buffered messages to the channel.
|
||||||
|
// If the implementation does not support buffering. this is a noop.
|
||||||
|
Flush() error
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue