Feature: add udp timeout configuration

This commit is contained in:
Linden Krouse 2021-01-07 11:16:03 -05:00 committed by GitHub
parent e5a01c7cc8
commit fc7ec17905
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 98 additions and 22 deletions

View file

@ -14,14 +14,17 @@ import (
)
func TestShutdownUDPConn(t *testing.T) {
entryPoint, err := NewUDPEntryPoint(&static.EntryPoint{
ep := static.EntryPoint{
Address: ":0",
Transport: &static.EntryPointsTransport{
LifeCycle: &static.LifeCycle{
GraceTimeOut: ptypes.Duration(5 * time.Second),
},
},
})
}
ep.SetDefaults()
entryPoint, err := NewUDPEntryPoint(&ep)
require.NoError(t, err)
go entryPoint.Start(context.Background())