Initial set of builds for Cadmium
This commit is contained in:
56
patches/collection.go
Normal file
56
patches/collection.go
Normal file
@@ -0,0 +1,56 @@
|
||||
// package telemetry implements a stub of the Caddy telemetry client package API
|
||||
// found at https://github.com/mholt/caddy/tree/master/telemetry
|
||||
//
|
||||
// It doesn't do anything. Replacing the telemetry code with a stub is the best
|
||||
// way to ensure compatibility with plugins is maintained. The
|
||||
// `-disabled-metrics` runtime flag doesn't work. The compile-time
|
||||
// `enableTelemetry` flag is OK, but this is better.
|
||||
|
||||
package telemetry
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func Init(instanceID uuid.UUID, disabledMetricsKeys []string) {
|
||||
|
||||
}
|
||||
|
||||
func StartEmitting() {
|
||||
|
||||
}
|
||||
|
||||
func StopEmitting() {
|
||||
|
||||
}
|
||||
|
||||
func Reset() {
|
||||
}
|
||||
|
||||
func Set(key string, val interface{}) {
|
||||
|
||||
}
|
||||
|
||||
func SetNested(key, subkey string, val interface{}) {
|
||||
|
||||
}
|
||||
|
||||
func Append(key string, value interface{}) {
|
||||
|
||||
}
|
||||
|
||||
func AppendUnique(key string, value interface{}) {
|
||||
|
||||
}
|
||||
|
||||
func Add(key string, amount int) {
|
||||
|
||||
}
|
||||
|
||||
func Increment(key string) {
|
||||
|
||||
}
|
||||
|
||||
func FastHash(input []byte) string {
|
||||
return ""
|
||||
}
|
27
patches/run.go.diff
Normal file
27
patches/run.go.diff
Normal file
@@ -0,0 +1,27 @@
|
||||
--- a/caddy/caddymain/run.go 2018-07-12 01:02:24.244606006 +0100
|
||||
+++ b/caddy/caddymain/run.go 2018-07-12 01:02:48.584895759 +0100
|
||||
@@ -117,7 +117,7 @@
|
||||
os.Exit(0)
|
||||
}
|
||||
if version {
|
||||
- fmt.Printf("%s %s (unofficial)\n", appName, appVersion)
|
||||
+ fmt.Printf("%s %s\n", appName, appVersion)
|
||||
if devBuild && gitShortStat != "" {
|
||||
fmt.Printf("%s\n%s\n", gitShortStat, gitFilesModified)
|
||||
}
|
||||
@@ -490,7 +490,7 @@
|
||||
return envMap, nil
|
||||
}
|
||||
|
||||
-const appName = "Caddy"
|
||||
+const appName = "Cadmium"
|
||||
|
||||
// Flags that control program flow or startup
|
||||
var (
|
||||
@@ -519,4 +519,4 @@
|
||||
gitFilesModified string // git diff-index --name-only HEAD
|
||||
)
|
||||
|
||||
-const enableTelemetry = true
|
||||
+const enableTelemetry = false
|
||||
lupine@gitlab-t470p:~/Desktop/caddy
|
Reference in New Issue
Block a user