tetragon

Форк
0
/
path.go 
21 строка · 679.0 Байт
1
// SPDX-License-Identifier: Apache-2.0
2
// Copyright Authors of Tetragon
3

4
package sensors
5

6
import (
7
	"strings"
8
)
9

10
// PathJoin creates a path meant for sensor filenames in /sys/fs/bpf.
11
//
12
// At some point, we would like to have a file hierarchy under /sys/fs/bpf for each sensor.
13
// see: https://github.com/cilium/tetragon/issues/408
14
//
15
// Unfortunately, this requires changes, for properly creating and deleting
16
// these directories requires. As an intermediate step, we use this function
17
// that uses dashes instead of / to create unique files in flat hierarchy,
18
// without needeing to manage directories.
19
func PathJoin(elem ...string) string {
20
	return strings.Join(elem, "-")
21
}
22

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.