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

rename transport to api

This commit is contained in:
Henrik Hautakoski 2023-04-19 09:52:29 +02:00
parent 044ed4e891
commit 102045e47e
15 changed files with 40 additions and 40 deletions

17
api/writer.go Normal file
View file

@ -0,0 +1,17 @@
package api
// Writer interface defines the required methods
// to send messages over an channel.
type Writer interface {
// Write writes a message over a channel.
// The message may or may not be buffered depending on the implementation.
Write(channel Channel, payload []byte) error
// Flush writes any buffered messages to the channel.
// If the implementation does not support buffering. this is a noop.
Flush() error
// Close closes the writer
// Any blocked Flush or Write operations will be unblocked.
Close() error
}