mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-24 10:01:04 +01:00
feat: idle sleep for proxmox LXCs
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
type agents struct{ pool.Pool[*AgentConfig] }
|
||||
|
||||
var Agents = agents{pool.New[*AgentConfig]()}
|
||||
var Agents = agents{pool.New[*AgentConfig]("agents")}
|
||||
|
||||
func (agents agents) Get(agentAddrOrDockerHost string) (*AgentConfig, bool) {
|
||||
if !IsDockerHostAgent(agentAddrOrDockerHost) {
|
||||
|
||||
@@ -11,10 +11,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/yusing/go-proxy/agent/pkg/certs"
|
||||
"github.com/yusing/go-proxy/internal/gperr"
|
||||
"github.com/yusing/go-proxy/internal/logging"
|
||||
"github.com/yusing/go-proxy/internal/net/gphttp"
|
||||
"github.com/yusing/go-proxy/pkg"
|
||||
)
|
||||
@@ -25,7 +23,6 @@ type AgentConfig struct {
|
||||
httpClient *http.Client
|
||||
tlsConfig *tls.Config
|
||||
name string
|
||||
l zerolog.Logger
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -136,8 +133,6 @@ func (cfg *AgentConfig) InitWithCerts(ctx context.Context, ca, crt, key []byte)
|
||||
}
|
||||
|
||||
cfg.name = string(name)
|
||||
cfg.l = logging.With().Str("agent", cfg.name).Logger()
|
||||
cfg.l.Info().Msg("agent initialized")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user