mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 02:43:37 +02:00
feat(docker): add Docker socket proxy support and related configurations
- Introduced Docker socket proxy handling in the agent. - Added environment variables for Docker socket configuration. - Implemented new Docker handler with endpoint permissions based on environment settings. - Added tests for Docker handler functionality. - Updated go.mod to include gorilla/mux for routing.
This commit is contained in:
@@ -82,10 +82,12 @@ func GetEnv[T any](key string, defaultValue T, parser func(string) (T, error)) T
|
||||
return defaultValue
|
||||
}
|
||||
|
||||
func stringstring(s string) (string, error) {
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func GetEnvString(key string, defaultValue string) string {
|
||||
return GetEnv(key, defaultValue, func(s string) (string, error) {
|
||||
return s, nil
|
||||
})
|
||||
return GetEnv(key, defaultValue, stringstring)
|
||||
}
|
||||
|
||||
func GetEnvBool(key string, defaultValue bool) bool {
|
||||
|
||||
Reference in New Issue
Block a user