I suggest having Expect() take a pair of interface arguments for the source and dest. In the felix FVs I quickly found that I wanted to expand on the types of source and dest that the connectivity checked could handle. The first time I did that, I added a new optional arg to ExpectSome/ExpectNone (for the destination port) but I regretted that decision as soon as the next variant came along.
In k8s, I expect we'll want destination types that include: pods, host-networked pods, nodeports, service IPs, external IPs(?), etc.
from slack: (shaun crampton, project calico)
I suggest having Expect() take a pair of interface arguments for the source and dest. In the felix FVs I quickly found that I wanted to expand on the types of source and dest that the connectivity checked could handle. The first time I did that, I added a new optional arg to ExpectSome/ExpectNone (for the destination port) but I regretted that decision as soon as the next variant came along. In k8s, I expect we'll want destination types that include: pods, host-networked pods, nodeports, service IPs, external IPs(?), etc.