INNER CODE UNIT · Go
cleanupWaitCommand
spegel-org/spegel · main.go:329
func cleanupWaitCommand(ctx context.Context, args *CleanupWaitCmd) error {
err := cleanup.Wait(ctx, args.ProbeEndpoint, args.Period, args.Threshold)
if err != nil {
return err
}
return nil
}
func getBootstrapper(cfg BootstrapConfig) (libp2p.Bootstrapper, error) { //nolint: ireturn // Return type can be different structs.
switch cfg.BootstrapKind {
case "dns":
return libp2p.NewDNSBootstrapper(cfg.DNSBootstrapDomain), nil
case "http":
pool, cert, err := httpx.LoadCerts(cfg.HTTPBootstrapCertDir)
if err != nil {
return nil, err
}
return libp2p.NewHTTPBootstrapper(cfg.HTTPBootstrapURL, pool, cert)