MeteorLight/listener/listener.go
DataHoarder b8610799c8
All checks were successful
continuous-integration/drone/push Build is passing
Refactor queue / mount sections and split into multiple files and interfaces
2022-09-03 16:26:45 +02:00

36 lines
783 B
Go

package listener
import "git.gammaspectra.live/S.O.N.G/Kirika/audio/packetizer"
type Information struct {
Identifier string `json:"identifier"`
Mount string `json:"mount"`
Path string `json:"path"`
Start int64 `json:"start"`
Headers []HeaderEntry `json:"headers"`
}
type HeaderEntry struct {
Name string `json:"name"`
Value string `json:"value"`
}
type Listener interface {
Identifier() string
Information() *Information
HasStarted() bool
Start(packets []packetizer.Packet) error
Write(packet packetizer.Packet) error
Close()
}
/*
type Listener struct {
Information ListenerInformation
Start func(packets []packetizer.Packet) error
Write func(packet packetizer.Packet) error
Close func()
}
*/