Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Jan 25, 2024
1 parent aae7f2a commit 669c132
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@

#Compiled binaries
bulkerapp/bulkerapp
bulker
ingest/ingest
sync-controller/syncctl
syncctl
sync-sidecar/sidecar
sidecar

#Go workspace files
#go.work
Expand Down
2 changes: 1 addition & 1 deletion ingest/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func (r *Router) getStream(loc *StreamCredentials) *StreamWithDestinations {
} else if loc.IngestType == IngestTypeS2S {
locators = []StreamLocator{r.WriteKeyStreamLocator, r.SlugStreamLocator, r.AmbiguousDomainStreamLocator}
} else {
locators = []StreamLocator{r.SlugStreamLocator, r.DomainStreamLocator, r.WriteKeyStreamLocator, r.SlugStreamLocator}
locators = []StreamLocator{r.SlugStreamLocator, r.DomainStreamLocator, r.WriteKeyStreamLocator, r.SoleStreamLocator}
}
for _, locator := range locators {
stream := locator(loc)
Expand Down
2 changes: 2 additions & 0 deletions jitsubase/appbase/app_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ func initViperVariables[C InstanceConfig](appConfig C) {
//fmt.Println("field", field.Name, field.Type, "implements", reflect.PointerTo(field.Type).Implements(modelType))
if reflect.PointerTo(field.Type).Implements(modelType) {
initViperVariables(elem.Field(i).Addr().Interface().(InstanceConfig))
} else if field.Type.Kind() == reflect.Struct {
logging.Fatalf("Application config has incorrect struct field '%s': all structs nested in config must implement interface 'InstanceConfig'", field.Name)
}
variable := field.Tag.Get("mapstructure")
if variable != "" {
Expand Down
6 changes: 3 additions & 3 deletions jitsubase/appbase/http_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ func (r *HTTPRepository[T]) loadFromHttp(tag any) (reader io.ReadCloser, newTag
if tag != nil && r.tagHeader != HTTPTagNone {
switch r.tagHeader {
case HTTPTagLastModified:
r.Infof("Loading repository from %s with If-Modified-Since: %v", r.url, tag)
r.Debugf("Loading repository from %s with If-Modified-Since: %v", r.url, tag)
req.Header.Add("If-Modified-Since", (tag.(time.Time)).Format(http.TimeFormat))
case HTTPTagETag:
r.Infof("Loading repository from %s with If-None-Match: %s", r.url, tag)
r.Debugf("Loading repository from %s with If-None-Match: %s", r.url, tag)
req.Header.Add("If-None-Match", tag.(string))
}
} else {
r.Infof("Loading repository from %s", r.url)
r.Debugf("Loading repository from %s", r.url)
}
if r.token != "" {
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", r.token))
Expand Down

0 comments on commit 669c132

Please sign in to comment.