Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sessionID HTTP Header to the Docker client setup (#570)
* chore: create network's session ID for reaper, only * chore: include reaper-specific labels to the reaper container * feat: initialise sessionID just once * chore: do not expose the sessionID function * fix: update reaper tests
- Loading branch information
1 parent
d9bb488
commit db41dd1
Showing
4 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package testcontainers | ||
|
||
import ( | ||
"sync" | ||
|
||
"github.com/google/uuid" | ||
) | ||
|
||
var tcSessionID uuid.UUID | ||
var tcSessionIDOnce sync.Once | ||
|
||
func sessionID() uuid.UUID { | ||
tcSessionIDOnce.Do(func() { | ||
tcSessionID = uuid.New() | ||
}) | ||
|
||
return tcSessionID | ||
} |