Skip to content

Commit 522b0af

Browse files
committed
add godoc
1 parent 712bc69 commit 522b0af

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

conformance/utils/config/listener.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,22 @@ limitations under the License.
1616

1717
package config
1818

19+
// DynamicPortRange specifies the starting and ending port of a
20+
// range
1921
type DynamicPortRange struct {
2022
Start int
2123
End int
2224
}
2325

26+
// ListenerConfig allow conformance test runners to configure
2427
type 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
2835
func 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]
3645
func SetupListenerConfig(c *ListenerConfig) {
3746
defaultConfig := DefaultListenerConfig()
3847

0 commit comments

Comments
 (0)