-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x-pack/filebeat/input/cel: add support for http+{unix,npipe} schemes
Also explicitly add cel to elastic/security-external-integrations ownership list.
- Loading branch information
Showing
6 changed files
with
96 additions
and
6 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
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 @@ | ||
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
// or more contributor license agreements. Licensed under the Elastic License; | ||
// you may not use this file except in compliance with the Elastic License. | ||
|
||
//go:build !windows | ||
|
||
package cel | ||
|
||
import ( | ||
"errors" | ||
"net" | ||
) | ||
|
||
// npipeDialer implements transport.Dialer. | ||
type npipeDialer struct { | ||
path string | ||
} | ||
|
||
func (npipeDialer) Dial(_, _ string) (net.Conn, error) { | ||
return nil, errors.New("named pipe only available on windows") | ||
} |
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,23 @@ | ||
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
// or more contributor license agreements. Licensed under the Elastic License; | ||
// you may not use this file except in compliance with the Elastic License. | ||
|
||
//go:build windows | ||
|
||
package cel | ||
|
||
import ( | ||
"net" | ||
"path/filepath" | ||
|
||
"github.com/Microsoft/go-winio" | ||
) | ||
|
||
// npipeDialer implements transport.Dialer to a constant named pipe path. | ||
type npipeDialer struct { | ||
path string | ||
} | ||
|
||
func (d npipeDialer) Dial(_, _ string) (net.Conn, error) { | ||
return winio.DialPipe(`\\.\pipe`+filepath.FromSlash(d.path), nil) | ||
} |