-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate windows and unix client_container for infra-ctl
- Loading branch information
1 parent
b86a3bd
commit ab931fb
Showing
5 changed files
with
29 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2023 New Relic Corporation. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
//go:build linux || darwin | ||
|
||
package sender | ||
|
||
const ( | ||
Runtime_docker = "docker" | ||
Check failure on line 8 in pkg/ctl/sender/client_container_unix.go GitHub Actions / linter-linux / Run Linter
|
||
Runtime_containerd = "containerd" | ||
Check failure on line 9 in pkg/ctl/sender/client_container_unix.go GitHub Actions / linter-linux / Run Linter
|
||
) | ||
|
||
func NewContainerClient(dockerAPIVersion, containerdNamespace, containerID, runtime string) (Client, error) { | ||
Check failure on line 12 in pkg/ctl/sender/client_container_unix.go GitHub Actions / linter-linux / Run Linter
|
||
if runtime == Runtime_containerd { | ||
return NewContainerdClient(containerdNamespace, containerID) | ||
} | ||
return NewDockerClient(dockerAPIVersion, containerID) | ||
Check failure on line 16 in pkg/ctl/sender/client_container_unix.go GitHub Actions / linter-linux / Run Linter
|
||
} |
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,7 @@ | ||
// Copyright 2020 New Relic Corporation. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package sender | ||
|
||
func NewContainerClient(dockerAPIVersion, containerdNamespace, containerID, runtime string) (Client, error) { | ||
return NewDockerClient(dockerAPIVersion, containerID) | ||
} |
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