metric - introduce new kube_endpoint_ports metric:
* export all relevant port infomation (port name, port number and port protocol) from an endpoint
tests - make endpoint tests endpoint.spec aware:
* endpoint port struct with multiple ports need port names per port
* single port struct doesn't need a port name
* port protocol is per default TCP
Signed-off-by: Constanti, Mario <mario.constanti@daimler.com>
- To allow other external Stores, remove the `FamilyByteSlicer` interface
and give access directly to `metric.Family`.
- Move functions present in `pkg/metric/generator.go` to a dedicated package
`generator` in `pkg/metric_generator/generator.go`.
Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
Since the removal of collector, this introduces both the concept of the
store and the resources instead of collectors that the user passes in.
The user facing logs and flags were not changed as that would be a
regression.