From cafd2ddddbb3a3e34e8c05a4cb11ef3f62b31afe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:40:49 +0000 Subject: [PATCH] fix(deps): update github.com/longhorn/go-common-libs digest to b75404d --- go.mod | 2 +- go.sum | 2 ++ .../longhorn/go-common-libs/utils/longhorn_naming.go | 11 +++++++++++ vendor/modules.txt | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 vendor/github.com/longhorn/go-common-libs/utils/longhorn_naming.go diff --git a/go.mod b/go.mod index 3beb235d..12fb2b2e 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ replace ( require ( github.com/google/fscrypt v0.3.4 - github.com/longhorn/go-common-libs v0.0.0-20240315062830-5aa0ac1dac62 + github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc github.com/mitchellh/go-ps v1.0.0 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index 7c7eb868..ac80591c 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,8 @@ github.com/longhorn/go-common-libs v0.0.0-20240307063052-6e77996eda29 h1:tyzIDCM github.com/longhorn/go-common-libs v0.0.0-20240307063052-6e77996eda29/go.mod h1:ePLGb2r/PJBUIVoVhLOt4bLOeu0S72ZB+fWDWwC8H28= github.com/longhorn/go-common-libs v0.0.0-20240315062830-5aa0ac1dac62 h1:ovotrq4HvaSRFgLozlNyUAvJp2eykdOwfpz4VIYZGIY= github.com/longhorn/go-common-libs v0.0.0-20240315062830-5aa0ac1dac62/go.mod h1:ePLGb2r/PJBUIVoVhLOt4bLOeu0S72ZB+fWDWwC8H28= +github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc h1:Eh9Npc5yBcVD8E4zVQIGUtC62HcfqevrHjQ2kh7fJ/E= +github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc/go.mod h1:ESTw7LYBF+dB5VndQNKXKrD6B9s/hF94lotGKXLovlM= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= diff --git a/vendor/github.com/longhorn/go-common-libs/utils/longhorn_naming.go b/vendor/github.com/longhorn/go-common-libs/utils/longhorn_naming.go new file mode 100644 index 00000000..a25e0ce7 --- /dev/null +++ b/vendor/github.com/longhorn/go-common-libs/utils/longhorn_naming.go @@ -0,0 +1,11 @@ +package utils + +import ( + "regexp" +) + +// IsEngineProcess distinguish if the process is a engine process by its name. +func IsEngineProcess(processName string) bool { + // engine process name example: pvc-5a8ee916-5989-46c6-bafc-ddbf7c802499-e-0 + return regexp.MustCompile(`.+?-e-.*\d$`).MatchString(processName) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 27e87a9b..351a782c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -26,7 +26,7 @@ github.com/google/fscrypt/util # github.com/google/uuid v1.6.0 ## explicit github.com/google/uuid -# github.com/longhorn/go-common-libs v0.0.0-20240315062830-5aa0ac1dac62 +# github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc ## explicit; go 1.21 github.com/longhorn/go-common-libs/exec github.com/longhorn/go-common-libs/io