1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-17 04:30:03 +02:00

Adding transport/publisher.go

This commit is contained in:
Henrik Hautakoski 2023-01-13 13:21:20 +01:00
parent 3251c94416
commit 6b6a375228

13
transport/publisher.go Normal file
View 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
}