revid: removed loadSender interface as no longer required

Removed the loadSender interface as no longer required. As a result close implementations that do nothing have also been removed.
This commit is contained in:
Saxon 2019-04-02 13:29:18 +10:30
parent 6b91746cf6
commit 681e07540a
1 changed files with 0 additions and 24 deletions

View File

@ -122,26 +122,6 @@ func extractMeta(r string, log func(lvl int8, msg string, args ...interface{}))
return nil
}
// loadSender is a destination to send a *ring.Chunk to.
// When a loadSender has finished using the *ring.Chunk
// it must be Closed.
type loadSender interface {
// load assigns the *ring.Chunk to the loadSender.
// The load call may fail, but must not mutate the
// the chunk.
load(d []byte) error
// send performs a destination-specific send
// operation. It must not mutate the chunk.
send() error
// release releases the *ring.Chunk.
release()
// close cleans up after use of the loadSender.
close() error
}
// restart is an optional interface for loadSenders that
// can restart their connection.
type restarter interface {
@ -215,8 +195,6 @@ func (s *mtsSender) Write(d []byte) (int, error) {
return len(d), nil
}
func (s *mtsSender) close() error { return nil }
// rtmpSender implements loadSender for a native RTMP destination.
type rtmpSender struct {
conn *rtmp.Conn
@ -313,5 +291,3 @@ func newRtpSender(addr string, log func(lvl int8, msg string, args ...interface{
func (s *rtpSender) Write(d []byte) (int, error) {
return s.encoder.Write(s.data)
}
func (s *rtpSender) close() error { return nil }