feature: Add client ip to inbound request information (#1678)

* feature: Add client ip to inbound request information
* feature (workers): Add the user's client IP to a session's connection information (#1749)
This commit is contained in:
Jim authored and GitHub committed 2021-12-09 20:41:08 -05:00
1 parent 2cfa027406
commit baa1d88f1f
36 files changed
+563 -169

No files matched your search

+2 -2
View File
@@ -24,11 +24,11 @@ import (
)
// TestConnection creates a test connection for the sessionId in the repository.
func TestConnection(t *testing.T, conn *db.DB, sessionId, clientTcpAddr string, clientTcpPort uint32, endpointTcpAddr string, endpointTcpPort uint32) *Connection {
func TestConnection(t *testing.T, conn *db.DB, sessionId, clientTcpAddr string, clientTcpPort uint32, endpointTcpAddr string, endpointTcpPort uint32, userClientIp string) *Connection {
t.Helper()
require := require.New(t)
rw := db.New(conn)
c, err := NewConnection(sessionId, clientTcpAddr, clientTcpPort, endpointTcpAddr, endpointTcpPort)
c, err := NewConnection(sessionId, clientTcpAddr, clientTcpPort, endpointTcpAddr, endpointTcpPort, userClientIp)
require.NoError(err)
id, err := newConnectionId()
require.NoError(err)