-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/trace/api: enable Windows pipe support (#6615)
Windows pipes are now supported by means of: * `DD_APM_WINDOWS_PIPE_NAME` defines the pipe name to be used. * `DD_APM_WINDOWS_PIPE_BUFFER_SIZE` defines the input buffer size (defaults to 1MB). * `DD_APM_WINDOWS_PIPE_SECURITY_DESCRIPTOR` allows setting the security ID. Defaults to `D:AI(A;;GA;;;WD)` (grants access to everyone)
- Loading branch information
Showing
5 changed files
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2016-2020 Datadog, Inc. | ||
|
||
// +build windows | ||
|
||
package api | ||
|
||
import ( | ||
"net" | ||
|
||
"github.com/Microsoft/go-winio" | ||
) | ||
|
||
func listenPipe(path string, secdec string, bufferSize int) (net.Listener, error) { | ||
return winio.ListenPipe(path, &winio.PipeConfig{ | ||
SecurityDescriptor: secdec, | ||
InputBufferSize: int32(bufferSize), | ||
}) | ||
} |
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 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2016-2020 Datadog, Inc. | ||
|
||
// +build !windows | ||
|
||
package api | ||
|
||
import ( | ||
"errors" | ||
"net" | ||
) | ||
|
||
func listenPipe(_, _ string, _ int) (net.Listener, error) { | ||
return nil, errors.New("Windows named pipes are only supported on Windows operating systems") | ||
} |
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,12 @@ | ||
# Each section from every releasenote are combined when the | ||
# CHANGELOG.rst is rendered. So the text needs to be worded so that | ||
# it does not depend on any information only available in another | ||
# section. This may mean repeating some details, but each section | ||
# must be readable independently of the other. | ||
# | ||
# Each section note must be formatted as reStructuredText. | ||
--- | ||
features: | ||
- | | ||
APM: Added support for Windows pipes. To enable it, set the pipe path using | ||
DD_APM_WINDOWS_PIPE_NAME. For more details check https://github.com/DataDog/datadog-agent/pull/6615 |