Skip to content

Commit

Permalink
feat(channel): add MIDIEventPublisher interface for MIDI event manage…
Browse files Browse the repository at this point in the history
…ment

Define an interface for publishing MIDI events, retrieving the event channel, and handling channel shutdown.
  • Loading branch information
Leandro Ferreira committed Oct 26, 2024
1 parent afd2ae7 commit 66cbabb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/contracts/channel/channel.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package channel

import (
"github.com/leandrodaf/midi-client/internal/entity"
)

// MIDIEventPublisher defines an interface for publishing and managing MIDI events.
type MIDIEventPublisher interface {
Publish(event entity.MIDI) // Publishes a MIDI event to the channel.
Events() <-chan entity.MIDI // Returns the MIDI event channel for reading.
Shutdown() // Shuts down the event channel.
GetChannel() chan entity.MIDI
}

0 comments on commit 66cbabb

Please sign in to comment.