rename mongoStruct to mongo_struct
This commit is contained in:
parent
69e0230949
commit
33471fac2d
@ -4,7 +4,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"sync"
|
"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"
|
prom "github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
)
|
)
|
@ -6,7 +6,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"time"
|
"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"
|
prom "github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
)
|
)
|
@ -7,7 +7,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"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"
|
prom "github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
mongoEvent "go.mongodb.org/mongo-driver/event"
|
mongoEvent "go.mongodb.org/mongo-driver/event"
|
@ -5,7 +5,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"time"
|
"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"
|
"github.com/jtagcat/util"
|
||||||
prom "github.com/prometheus/client_golang/prometheus"
|
prom "github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
@ -9,7 +9,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"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"
|
"github.com/jtagcat/util"
|
||||||
prom "github.com/prometheus/client_golang/prometheus"
|
prom "github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
@ -10,7 +10,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"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"
|
"github.com/fsnotify/fsnotify"
|
||||||
prom "github.com/prometheus/client_golang/prometheus"
|
prom "github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
@ -20,6 +20,8 @@ import (
|
|||||||
|
|
||||||
const DatabaseCommandTimeout = 10 * time.Second
|
const DatabaseCommandTimeout = 10 * time.Second
|
||||||
|
|
||||||
|
const PrometheusPrefix = "logmower" // TODO:
|
||||||
|
|
||||||
// wrapper to force copying before use
|
// wrapper to force copying before use
|
||||||
func defaultBackoff() wait.Backoff {
|
func defaultBackoff() wait.Backoff {
|
||||||
return wait.Backoff{
|
return wait.Backoff{
|
@ -1,4 +1,4 @@
|
|||||||
package logmower
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
@ -7,12 +7,12 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"git.k-space.ee/k-space/logmower-shipper/logmower"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
)
|
)
|
||||||
|
|
||||||
const PrometheusPrefix = "logmower"
|
const PrometheusPrefix = "logmower" // TODO:
|
||||||
|
|
||||||
// TODO:
|
|
||||||
func main() {
|
func main() {
|
||||||
go func() {
|
go func() {
|
||||||
metricsPort := 2112
|
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)
|
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 (
|
import (
|
||||||
"time"
|
"time"
|
@ -1,4 +1,4 @@
|
|||||||
package mongoStruct
|
package mongo_struct
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
@ -1,4 +1,6 @@
|
|||||||
package mongoStruct
|
package mongo_struct
|
||||||
|
|
||||||
|
// TODO: this is misc collection of stuff not really fitting in here
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
Loading…
Reference in New Issue
Block a user