refactor: use ports-get plugn trigger for fetching port mappings
This removes use of ports internals from other plugins, which will make it easier to refactor the underlying property storage.
This commit is contained in:
1 parent
9bd6e17903
commit
914475f3e4
10 files changed
+48
-24
No files matched your search
@@ -1,9 +1,24 @@
|
||||
package ports
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/dokku/dokku/plugins/config"
|
||||
)
|
||||
|
||||
// TriggerPortsGet prints out the port mapping for a given app
|
||||
func TriggerPortsGet(appName string) error {
|
||||
for _, portMap := range getPortMaps(appName) {
|
||||
if portMap.AllowsPersistence() {
|
||||
continue
|
||||
}
|
||||
|
||||
fmt.Println(portMap)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostCertsRemove unsets port config vars after SSL cert is added
|
||||
func TriggerPostCertsRemove(appName string) error {
|
||||
keys := []string{"DOKKU_PROXY_SSL_PORT"}
|
||||
|
||||
Reference in new issue
Block a user