File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,22 @@ limitations under the License.
1616
1717package config
1818
19+ // DynamicPortRange specifies the starting and ending port of a
20+ // range
1921type DynamicPortRange struct {
2022 Start int
2123 End int
2224}
2325
26+ // ListenerConfig allow conformance test runners to configure
2427type ListenerConfig struct {
2528 DynamicPortRange DynamicPortRange
2629}
2730
31+ // DefaultListenerConfig returns a [ListenerConfig] where the [DynamicPortRange]
32+ // defaults to the suggested IANA [dynamic port range] (49152-65535)
33+ //
34+ // [dynamic port range]: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
2835func DefaultListenerConfig () ListenerConfig {
2936 return ListenerConfig {
3037 DynamicPortRange : DynamicPortRange {
@@ -33,6 +40,8 @@ func DefaultListenerConfig() ListenerConfig {
3340 },
3441 }
3542}
43+
44+ // SetupListenerConfig will apply defaults to the passed [ListenerConfig]
3645func SetupListenerConfig (c * ListenerConfig ) {
3746 defaultConfig := DefaultListenerConfig ()
3847
You can’t perform that action at this time.
0 commit comments