mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-18 18:27:29 +08:00
parallel optimization groundwork
This commit is contained in:
@@ -16,6 +16,11 @@ import (
|
||||
|
||||
type AlertFunc func(msg string)
|
||||
|
||||
type channelHealthManager interface {
|
||||
CheckHealth(ctx context.Context) map[string]error
|
||||
RestartChannel(ctx context.Context, name string) error
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
cfgPath string
|
||||
workspace string
|
||||
@@ -25,7 +30,7 @@ type Service struct {
|
||||
runner *lifecycle.LoopRunner
|
||||
mu sync.RWMutex
|
||||
lastAlerts map[string]time.Time
|
||||
mgr *channels.Manager
|
||||
mgr channelHealthManager
|
||||
healingChannels map[string]bool
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user