Skip to content

Commit

Permalink
disabled socketio to avoid build issues, waiting for upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
sfermi committed Mar 1, 2019
1 parent 8c400a0 commit 6f440fd
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 32 deletions.
52 changes: 29 additions & 23 deletions cli/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions cli/contrib.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.

/* This file handles third party contributions and libraries.*/
/*This file handles third party contributions and libraries.*/
package main

import (
Expand All @@ -12,16 +12,17 @@ import (
"github.com/gin-gonic/gin"
)

// GET /datasets
// GetAllDatasets GET /datasets
func GetAllDatasets(c *gin.Context) {
c.JSON(http.StatusOK, dataset.FetchAllDatasets())
}

// AddRegistryRequest Definition for AddRegistryRequest
type AddRegistryRequest struct {
URL string `json:"url"`
}

// POST /datasets/registry
// AddNewRegistry POST /datasets/registry
func AddNewRegistry(c *gin.Context) {
var addRegistryRequest AddRegistryRequest
c.BindJSON(&addRegistryRequest)
Expand Down
16 changes: 14 additions & 2 deletions cli/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ You can uninstall that service by using cvpm daemon uninstall */
package main

import (
"fmt"
"log"
"net/http"
"net/http/httputil"
Expand All @@ -22,7 +23,7 @@ import (
"github.com/hpcloud/tail"
)

// Default Running Port
// DaemonPort Default Running Port
const DaemonPort = "10590"

// Definition of Running Repos
Expand Down Expand Up @@ -115,9 +116,15 @@ func GetSystemHandler(c *gin.Context) {

// Handle Socket Request
func socketHandler(c *gin.Context) {
socketServer.OnConnect("/", func(so socketio.Conn) error {
// so.J
return nil
})
/* Todo: Upgrade to v1.4 of go-socket.io
socketServer.On("connection", func(so socketio.Socket) {
so.Join("cvpm-webtail")
})
*/
socketServer.ServeHTTP(c.Writer, c.Request)
}

Expand All @@ -130,7 +137,12 @@ func writeLog(filepath string, server *socketio.Server, eventName string) {
panic(err)
}
for line := range t.Lines {
server.BroadcastTo("cvpm-webtail", eventName, line.Text)
/* Todo: Upgrade to v1.4 of go-socket.io
// server.BroadcastTo("cvpm-webtail", eventName, line.Text)
// server.
*/
fmt.Println(line)
}
}

Expand Down
8 changes: 4 additions & 4 deletions cli/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2019 The CVPM Authors. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.

/*
Package CVPM (main) implements the CLI for CVPM.
To get started, use:
Expand All @@ -6,10 +10,6 @@ cvpm help
to get a detailed explanation.
*/
// Copyright 2019 The CVPM Authors. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.

package main

import (
Expand Down
5 changes: 5 additions & 0 deletions cli/virtual.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright 2019 The CVPM Authors. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.

package main

0 comments on commit 6f440fd

Please sign in to comment.