rename mongoStruct to mongo_struct
This commit is contained in:
		| @@ -4,7 +4,7 @@ import ( | ||||
| 	"log" | ||||
| 	"sync" | ||||
| 
 | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongoStruct" | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongo_struct" | ||||
| 	prom "github.com/prometheus/client_golang/prometheus" | ||||
| 	"github.com/prometheus/client_golang/prometheus/promauto" | ||||
| ) | ||||
| @@ -6,7 +6,7 @@ import ( | ||||
| 	"log" | ||||
| 	"time" | ||||
| 
 | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongoStruct" | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongo_struct" | ||||
| 	prom "github.com/prometheus/client_golang/prometheus" | ||||
| 	"github.com/prometheus/client_golang/prometheus/promauto" | ||||
| ) | ||||
| @@ -7,7 +7,7 @@ import ( | ||||
| 	"net/url" | ||||
| 	"time" | ||||
| 
 | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongoStruct" | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongo_struct" | ||||
| 	prom "github.com/prometheus/client_golang/prometheus" | ||||
| 	"github.com/prometheus/client_golang/prometheus/promauto" | ||||
| 	mongoEvent "go.mongodb.org/mongo-driver/event" | ||||
| @@ -5,7 +5,7 @@ import ( | ||||
| 	"log" | ||||
| 	"time" | ||||
| 
 | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongoStruct" | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongo_struct" | ||||
| 	"github.com/jtagcat/util" | ||||
| 	prom "github.com/prometheus/client_golang/prometheus" | ||||
| 	"github.com/prometheus/client_golang/prometheus/promauto" | ||||
| @@ -9,7 +9,7 @@ import ( | ||||
| 	"os" | ||||
| 	"time" | ||||
| 
 | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongoStruct" | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongo_struct" | ||||
| 	"github.com/jtagcat/util" | ||||
| 	prom "github.com/prometheus/client_golang/prometheus" | ||||
| 	"github.com/prometheus/client_golang/prometheus/promauto" | ||||
| @@ -10,7 +10,7 @@ import ( | ||||
| 	"sync" | ||||
| 	"time" | ||||
| 
 | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongoStruct" | ||||
| 	ms "git.k-space.ee/k-space/logmower-shipper/pkg/mongo_struct" | ||||
| 	"github.com/fsnotify/fsnotify" | ||||
| 	prom "github.com/prometheus/client_golang/prometheus" | ||||
| 	"github.com/prometheus/client_golang/prometheus/promauto" | ||||
| @@ -20,6 +20,8 @@ import ( | ||||
| 
 | ||||
| const DatabaseCommandTimeout = 10 * time.Second | ||||
| 
 | ||||
| const PrometheusPrefix = "logmower" // TODO: | ||||
| 
 | ||||
| // wrapper to force copying before use | ||||
| func defaultBackoff() wait.Backoff { | ||||
| 	return wait.Backoff{ | ||||
| @@ -1,4 +1,4 @@ | ||||
| package logmower | ||||
| package main | ||||
| 
 | ||||
| import ( | ||||
| 	"errors" | ||||
| @@ -7,12 +7,12 @@ import ( | ||||
| 	"net/http" | ||||
| 	"os" | ||||
| 
 | ||||
| 	"git.k-space.ee/k-space/logmower-shipper/logmower" | ||||
| 	"github.com/prometheus/client_golang/prometheus/promhttp" | ||||
| ) | ||||
| 
 | ||||
| const PrometheusPrefix = "logmower" | ||||
| const PrometheusPrefix = "logmower" // TODO: | ||||
| 
 | ||||
| // TODO: | ||||
| func main() { | ||||
| 	go func() { | ||||
| 		metricsPort := 2112 | ||||
| @@ -26,7 +26,7 @@ func main() { | ||||
| 		} | ||||
| 	}() | ||||
| 
 | ||||
| 	if err := App.Run(os.Args); err != nil { | ||||
| 	if err := logmower.App.Run(os.Args); err != nil { | ||||
| 		log.Fatal(err) | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										15
									
								
								pkg/ctx_keys/ctx_keys.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								pkg/ctx_keys/ctx_keys.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| package ctx_keys | ||||
|  | ||||
| // type Key uint32 | ||||
|  | ||||
| // // The operations fsnotify can trigger; see the documentation on [Watcher] for a | ||||
| // // full description, and check them with [Event.Has]. | ||||
| // const ( | ||||
| // 	PrometheusPrefix Key = 1 << iota | ||||
| // ) | ||||
|  | ||||
| // var keyMap = map[Key]reflect.Type{} | ||||
|  | ||||
| // func get(ctx context.Context, key Key) (val any, ok bool) { | ||||
| // 	ctx.Value() | ||||
| // } | ||||
| @@ -1,4 +1,4 @@ | ||||
| package mongoStruct | ||||
| package mongo_struct | ||||
| 
 | ||||
| import ( | ||||
| 	"time" | ||||
| @@ -1,4 +1,4 @@ | ||||
| package mongoStruct | ||||
| package mongo_struct | ||||
| 
 | ||||
| import ( | ||||
| 	"context" | ||||
| @@ -1,4 +1,6 @@ | ||||
| package mongoStruct | ||||
| package mongo_struct | ||||
| 
 | ||||
| // TODO: this is misc collection of stuff not really fitting in here | ||||
| 
 | ||||
| import ( | ||||
| 	"fmt" | ||||
		Reference in New Issue
	
	Block a user