changeset 1466:d7152eb11d58

Added api doc strings for the geoserver package.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 03 Dec 2018 20:46:35 +0100
parents cc60a2b5ed71
children 5ad79db38ecf 858af4614209
files pkg/geoserver/boot.go pkg/geoserver/reconf.go
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/geoserver/boot.go	Mon Dec 03 17:42:20 2018 +0100
+++ b/pkg/geoserver/boot.go	Mon Dec 03 20:46:35 2018 +0100
@@ -537,6 +537,8 @@
 	return nil
 }
 
+// PrepareGeoServer sets up the GeoServer to work together with the gemma server.
+// It sets up a workspace, a datastore and exposes the features and styles.
 func PrepareGeoServer() error {
 
 	if config.DBUser() == "" {
@@ -564,6 +566,8 @@
 	return nil
 }
 
+// ReconfigureStyle returns a function to update a style
+// in the GeoServer to be in sync with the database.
 func ReconfigureStyle(name string) {
 	Reconfigure(func() error {
 		var stls styles
--- a/pkg/geoserver/reconf.go	Mon Dec 03 17:42:20 2018 +0100
+++ b/pkg/geoserver/reconf.go	Mon Dec 03 20:46:35 2018 +0100
@@ -72,6 +72,10 @@
 	return err
 }
 
+// Reconfigure adds a function to a queue of functions to update
+// the GeoServer async. The functions are run again a number
+// of times if network errors apppear indicating that the
+// GeoServer is down.
 func Reconfigure(fn func() error) {
 	confQueueCond.L.Lock()
 	defer confQueueCond.L.Unlock()