mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-31 14:13:09 +02:00
Align variable names with main
This commit is contained in:
@@ -9,12 +9,12 @@ import (
|
||||
|
||||
idlewatcher "github.com/yusing/godoxy/internal/idlewatcher/types"
|
||||
"github.com/yusing/godoxy/internal/types"
|
||||
gevents "github.com/yusing/goutils/events"
|
||||
"github.com/yusing/goutils/events"
|
||||
)
|
||||
|
||||
func DebugHandler(rw http.ResponseWriter, r *http.Request) {
|
||||
w := &Watcher{
|
||||
events: gevents.NewHistory(),
|
||||
events: events.NewHistory(),
|
||||
cfg: &types.IdlewatcherConfig{
|
||||
IdlewatcherProviderConfig: types.IdlewatcherProviderConfig{
|
||||
Docker: &types.DockerConfig{
|
||||
|
||||
@@ -72,7 +72,7 @@ func (p *DockerProvider) ContainerStatus(ctx context.Context) (idlewatcher.Conta
|
||||
|
||||
func (p *DockerProvider) Watch(ctx context.Context) (eventCh <-chan watcher.Event, errCh <-chan error) {
|
||||
return p.watcher.EventsWithOptions(ctx, watcher.DockerListOptions{
|
||||
Filters: watcher.NewDockerFilter(
|
||||
Filters: watcher.NewDockerFilters(
|
||||
watcher.DockerFilterContainer,
|
||||
watcher.DockerFilterContainerNameID(p.containerID),
|
||||
watcher.DockerFilterStart,
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/yusing/godoxy/internal/types"
|
||||
watcherEvents "github.com/yusing/godoxy/internal/watcher/events"
|
||||
gperr "github.com/yusing/goutils/errs"
|
||||
gevents "github.com/yusing/goutils/events"
|
||||
"github.com/yusing/goutils/events"
|
||||
"github.com/yusing/goutils/http/reverseproxy"
|
||||
strutils "github.com/yusing/goutils/strings"
|
||||
"github.com/yusing/goutils/synk"
|
||||
@@ -67,7 +67,7 @@ type (
|
||||
task *task.Task
|
||||
|
||||
// Per-watcher event history (for SSE and debug)
|
||||
events *gevents.History
|
||||
events *events.History
|
||||
|
||||
dependsOn []*dependency
|
||||
}
|
||||
@@ -132,7 +132,7 @@ func NewWatcher(parent task.Parent, r types.Route, cfg *Config) (*Watcher, error
|
||||
idleTicker: time.NewTicker(cfg.IdleTimeout),
|
||||
healthTicker: time.NewTicker(idleWakerCheckInterval),
|
||||
readyNotifyCh: make(chan struct{}, 1), // buffered to avoid blocking
|
||||
events: gevents.NewHistory(),
|
||||
events: events.NewHistory(),
|
||||
cfg: cfg,
|
||||
routeHelper: routeHelper{
|
||||
hc: monitor.NewMonitor(r),
|
||||
|
||||
@@ -18,7 +18,7 @@ type (
|
||||
IdlewatcherConfigBase struct {
|
||||
// 0: no idle watcher.
|
||||
// Positive: idle watcher with idle timeout.
|
||||
// Negative: idle watcher as a dependency. IdleTimeout time.Duration `json:"idle_timeout" json_ext:"duration"`
|
||||
// Negative: idle watcher as a dependency.
|
||||
IdleTimeout time.Duration `json:"idle_timeout"`
|
||||
WakeTimeout time.Duration `json:"wake_timeout"`
|
||||
StopTimeout time.Duration `json:"stop_timeout"`
|
||||
|
||||
@@ -33,9 +33,9 @@ var (
|
||||
DockerFilterPause = filters.Arg("event", string(dockerEvents.ActionPause))
|
||||
DockerFilterUnpause = filters.Arg("event", string(dockerEvents.ActionUnPause))
|
||||
|
||||
NewDockerFilter = filters.NewArgs
|
||||
NewDockerFilters = filters.NewArgs
|
||||
|
||||
optionsDefault = DockerListOptions{Filters: NewDockerFilter(
|
||||
optionsDefault = DockerListOptions{Filters: NewDockerFilters(
|
||||
DockerFilterContainer,
|
||||
DockerFilterStart,
|
||||
// DockerFilterStop,
|
||||
|
||||
Reference in New Issue
Block a user