feat(config): initialize agents in parallel, speed up config loading

This commit is contained in:
yusing
2025-04-05 14:04:11 +08:00
parent 3689e72eff
commit fb217cf80e
3 changed files with 35 additions and 6 deletions

View File

@@ -181,6 +181,10 @@ func (cfg *AgentConfig) DialContext(ctx context.Context) (net.Conn, error) {
return gphttp.DefaultDialer.DialContext(ctx, "tcp", cfg.Addr)
}
func (cfg *AgentConfig) IsInitialized() bool {
return cfg.name != ""
}
func (cfg *AgentConfig) Name() string {
return cfg.name
}