Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ilayzen committed Feb 7, 2023
1 parent a02825e commit 6930555
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 104 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ COPY --from=builder /app/cassandra/schema.sql /usr/local/bin
COPY --from=builder /app/dist/janus /bin/janus
RUN chmod a+x /bin/janus && \
mkdir -p /etc/janus/apis && \
mkdir -p /etc/janus/auth && \
mkdir -p /etc/config

mkdir -p /etc/janus/auth

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
Expand Down
30 changes: 0 additions & 30 deletions assets/apis/example_SingleDefinition.json

This file was deleted.

10 changes: 0 additions & 10 deletions assets/auth/auth.json

This file was deleted.

46 changes: 0 additions & 46 deletions pkg/cache/cache.go

This file was deleted.

12 changes: 0 additions & 12 deletions pkg/kafka/factConsumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package kafka
import (
"context"
"encoding/json"
"fmt"
"github.com/hellofresh/janus/pkg/models"
"github.com/segmentio/kafka-go"
log "github.com/sirupsen/logrus"
Expand All @@ -17,18 +16,13 @@ func StartFactConsumer(kafkaAddr, topic, dlqtopic, consumerGroup string) {
if err != nil {
return err
}
fmt.Println("starting ping facts...")

var role models.Role

err = json.Unmarshal(*fact.Object, &role)
if err != nil {
log.Println(err)
}

fmt.Println(role)

fmt.Println("end of pinging gateway...")
return nil
},
func(msg Message, inerr error) {
Expand All @@ -45,12 +39,6 @@ func StartFactConsumer(kafkaAddr, topic, dlqtopic, consumerGroup string) {
return
}

func factToCache(fact *models.Fact) *models.Fact {
return &models.Fact{
Object: fact.Object,
}
}

type KafkaProducer struct {
kafkaWriter *kafka.Writer
}
Expand Down
3 changes: 0 additions & 3 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package server
import (
"context"
"fmt"
"github.com/hellofresh/janus/pkg/cache"
"net"
"net/http"
"time"
Expand Down Expand Up @@ -38,13 +37,11 @@ type Server struct {
webServer *web.Server
profilingEnabled bool
profilingPublic bool
cache *cache.Cache
}

// New creates a new instance of Server
func New(opts ...Option) *Server {
s := Server{
cache: cache.NewCache(),
configurationChan: make(chan api.ConfigurationChanged, 100),
stopChan: make(chan struct{}, 1),
}
Expand Down

0 comments on commit 6930555

Please sign in to comment.