k3s/pkg/util/net/sets
Justin Santa Barbara cb92133dfa LB Source Ranges: Move validation into API layer
Had to move other things around too to avoid a weird api ->
cloudprovider dependency.

Also adding fixes per code reviews.

(This is a squash of the previously approved commits)
2016-03-03 10:27:17 -05:00
..
README.md LB Source Ranges: Move validation into API layer 2016-03-03 10:27:17 -05:00
ipnet.go LB Source Ranges: Move validation into API layer 2016-03-03 10:27:17 -05:00
ipnet_test.go LB Source Ranges: Move validation into API layer 2016-03-03 10:27:17 -05:00

README.md

This package contains hand-coded set implementations that should be similar to the autogenerated ones in pkg/util/sets.

We can't simply use net.IPNet as a map-key in Go (because it contains a []byte).

We could use the same workaround we use here (a string representation as the key) to autogenerate sets. If we do that, or decide on an alternate approach, we should replace the implementations in this package with the autogenerated versions.

It is expected that callers will alias this import as netsets i.e. import netsets "k8s.io/kubernetes/pkg/util/net/sets"

Analytics