Skip to content

Commit

Permalink
poc
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Ding <jackding@gmail.com>
  • Loading branch information
jzding committed May 22, 2024
1 parent d3ce1fc commit 2d06af9
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 1,803 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ require (
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.0
github.com/prometheus/client_golang v1.14.0
github.com/redhat-cne/sdk-go v0.1.1-0.20240321130308-a635605654ab
github.com/redhat-cne/sdk-go v0.0.0-unpublished
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.8.0
golang.org/x/net v0.7.0
)

replace github.com/redhat-cne/sdk-go v0.0.0-unpublished => ../sdk-go

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI
github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/redhat-cne/sdk-go v0.1.1-0.20240321130308-a635605654ab h1:wEL+n2kJLbNevuQOoYflv7DlHJZt1+DcrJDn1dRgFnw=
github.com/redhat-cne/sdk-go v0.1.1-0.20240321130308-a635605654ab/go.mod h1:A7dN1yEB9aziTPyl6M24apOECGOqKMbieKs7ydKrE/I=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
Expand Down
1 change: 1 addition & 0 deletions routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import (
// 400: badReq
// 204: noContent
func (s *Server) createSubscription(w http.ResponseWriter, r *http.Request) {
log.Printf("DZK in V1 createSubscription")
defer r.Body.Close()
var response *http.Response
bodyBytes, err := io.ReadAll(r.Body)
Expand Down
1 change: 1 addition & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func (s *Server) GetHostPath() *types.URI {

// Start will start res routes service
func (s *Server) Start() {
log.Infof("DZK starting V1 REST server at port %d", s.port)
if s.status == started || s.status == starting {
log.Infof("Server is already running at port %d", s.port)
return
Expand Down
Loading

0 comments on commit 2d06af9

Please sign in to comment.