mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-23 19:49:02 +02:00
Various fixes & improvement tweaks
This commit is contained in:
parent
acc3c286a1
commit
d298d0c97b
9 changed files with 53 additions and 9 deletions
|
@ -10,6 +10,13 @@ import (
|
|||
"m1k1o/neko/internal/types"
|
||||
)
|
||||
|
||||
type PipelineSignal int
|
||||
|
||||
const (
|
||||
PL_STOP PipelineSignal = 0x00
|
||||
PL_START = 0x01
|
||||
)
|
||||
|
||||
type BroacastManagerCtx struct {
|
||||
logger zerolog.Logger
|
||||
mu sync.Mutex
|
||||
|
@ -18,6 +25,7 @@ type BroacastManagerCtx struct {
|
|||
pipelineMu sync.Mutex
|
||||
pipelineFn func(url string) (string, error)
|
||||
pipelineRestart chan bool
|
||||
pipelineSignal chan PipelineSignal
|
||||
|
||||
url string
|
||||
started bool
|
||||
|
@ -77,6 +85,10 @@ func (manager *BroacastManagerCtx) GetRestart() chan bool {
|
|||
return manager.pipelineRestart
|
||||
}
|
||||
|
||||
func (manager *BroacastManagerCtx) GetSignal() chan PipelineSignal {
|
||||
return manager.pipelineSignal
|
||||
}
|
||||
|
||||
func (manager *BroacastManagerCtx) Url() string {
|
||||
manager.mu.Lock()
|
||||
defer manager.mu.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue