New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate HTTP server #250
Integrate HTTP server #250
Conversation
2d95dee
to
171e499
Compare
…emphis-nats-integrartion-http
45a6fa1
to
51b356f
Compare
github.com/googollee/go-socket.io v1.6.2 | ||
github.com/hanzoai/gochimp3 v0.0.0-20210305004051-da66ea724147 | ||
github.com/klauspost/compress v1.14.4 | ||
github.com/lightstep/otel-launcher-go v1.5.1 | ||
github.com/minio/highwayhash v1.0.2 | ||
github.com/nats-io/jwt/v2 v2.3.0 | ||
github.com/nats-io/nats.go v1.15.0 | ||
github.com/nats-io/nats.go v1.16.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need the nats SDK package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, NATS' tests use it, and they also rely on latest version
handlers/handlers.go
Outdated
@@ -187,7 +196,7 @@ func CreateDefaultStation(stationName string, username string) (models.Station, | |||
Functions: []models.Function{}, | |||
} | |||
|
|||
err = broker.CreateStream(newStation) | |||
err = s.CreateStation(newStation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to create stream
handlers/monitoring.go
Outdated
ActualPods: 0, | ||
}) | ||
} | ||
// if broker.IsConnectionAlive() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove these lines, in line 126 change the "control-plane" to "broker"
handlers/poison_messages.go
Outdated
|
||
func (pmh PoisonMessagesHandler) HandleNewMessage(msg *nats.Msg) { | ||
func (pmh PoisonMessagesHandler) HandleNewMessage(subject string, msg []byte) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first param is not used you can switch to _ instead
@@ -100,6 +101,10 @@ func handleError(s *server.Server, message string, err error) { | |||
|
|||
func runMemphis(s *server.Server) { | |||
|
|||
if !s.MemphisInitialized() { | |||
s.Fatalf("Jetstream not enabled on global account") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what this error means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that we started NATS w/o enabling Jetstream,
mostly internal as we should always use NATS+JS,
a good point, we should make the default behaviour to run with the --js flag
server/memphis_helper.go
Outdated
return nil | ||
} | ||
|
||
func CreateProducer() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove this function and the use of it across the entire application
server/memphis_helper.go
Outdated
return nil | ||
} | ||
|
||
func RemoveProducer() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove this function and the use of it across the entire application
server/memphis_helper.go
Outdated
return nil | ||
} | ||
|
||
func (s *Server) CreateStation(station models.Station) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to create stream
server/memphis_helper_test.go
Outdated
@@ -0,0 +1,112 @@ | |||
// Copyright 2019-2022 The NATS Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace those headers to Memphis headers across the entire application. You can find the Memphis headers inside 1 of the memphis files from the staging branch
No description provided.