Peer discovery?

I first want to point out that I’m new to p2p networks/networking.

I’m trying to create a p2p program using gossipsub. I looked at the documentation and tried some things. The functino all_peers seemed like the solution to finding all the peers on the network for that topic, however it didn’t work (I could have missed something in the documentation). Then I tried Kademlia. I was scrolling through the documentation for the Kademlia section of rust-libp2p, and I saw somethings that could work, but also want advice if that’s that the best thing to do.

One idea I have to is to use the start_providing function with a hardcoded key. Then use get_providers with said key to find others peers.

Is there a better way to do this?