refactor: 修改module名称适应私有仓库

main v0.1.0
NorthLan 3 years ago
parent cc68630e25
commit bac4f410ad

@ -2,11 +2,11 @@ package cluster
import ( import (
"context" "context"
"git.noahlan.cn/northlan/ngs/cluster/clusterpb"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/mock"
"git.noahlan.cn/northlan/ngs/session"
"net" "net"
"ngs/cluster/clusterpb"
"ngs/internal/message"
"ngs/mock"
"ngs/session"
) )
type acceptor struct { type acceptor struct {

@ -3,15 +3,15 @@ package cluster
import ( import (
"errors" "errors"
"fmt" "fmt"
"git.noahlan.cn/northlan/ngs/internal/codec"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/internal/packet"
"git.noahlan.cn/northlan/ngs/pipeline"
"git.noahlan.cn/northlan/ngs/scheduler"
"git.noahlan.cn/northlan/ngs/session"
"net" "net"
"ngs/internal/codec"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/internal/packet"
"ngs/pipeline"
"ngs/scheduler"
"ngs/session"
"reflect" "reflect"
"sync/atomic" "sync/atomic"
"time" "time"

@ -3,8 +3,8 @@ package cluster
import ( import (
"context" "context"
"fmt" "fmt"
"ngs/cluster/clusterpb" "git.noahlan.cn/northlan/ngs/cluster/clusterpb"
"ngs/internal/log" "git.noahlan.cn/northlan/ngs/internal/log"
"sync" "sync"
) )

@ -3,8 +3,8 @@ package cluster
import ( import (
"context" "context"
"errors" "errors"
"git.noahlan.cn/northlan/ngs/internal/env"
"google.golang.org/grpc" "google.golang.org/grpc"
"ngs/internal/env"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"

@ -4,19 +4,19 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.noahlan.cn/northlan/ngs/cluster/clusterpb"
"git.noahlan.cn/northlan/ngs/component"
"git.noahlan.cn/northlan/ngs/internal/codec"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/internal/packet"
"git.noahlan.cn/northlan/ngs/pipeline"
"git.noahlan.cn/northlan/ngs/scheduler"
"git.noahlan.cn/northlan/ngs/session"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"math/rand" "math/rand"
"net" "net"
"ngs/cluster/clusterpb"
"ngs/component"
"ngs/internal/codec"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/internal/packet"
"ngs/pipeline"
"ngs/scheduler"
"ngs/session"
"reflect" "reflect"
"sort" "sort"
"strings" "strings"

@ -1,6 +1,6 @@
package cluster package cluster
import "ngs/cluster/clusterpb" import "git.noahlan.cn/northlan/ngs/cluster/clusterpb"
type Member struct { type Member struct {
isMaster bool isMaster bool

@ -4,18 +4,18 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"git.noahlan.cn/northlan/ngs/cluster/clusterpb"
"git.noahlan.cn/northlan/ngs/component"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/pipeline"
"git.noahlan.cn/northlan/ngs/scheduler"
"git.noahlan.cn/northlan/ngs/session"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"google.golang.org/grpc" "google.golang.org/grpc"
"net" "net"
"net/http" "net/http"
"ngs/cluster/clusterpb"
"ngs/component"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/pipeline"
"ngs/scheduler"
"ngs/session"
"strings" "strings"
"sync" "sync"
"time" "time"

@ -1,4 +1,4 @@
module ngs module git.noahlan.cn/northlan/ngs
go 1.18 go 1.18

@ -2,10 +2,10 @@ package ngs
import ( import (
"fmt" "fmt"
"ngs/internal/env" "git.noahlan.cn/northlan/ngs/internal/env"
"ngs/internal/log" "git.noahlan.cn/northlan/ngs/internal/log"
"ngs/internal/message" "git.noahlan.cn/northlan/ngs/internal/message"
"ngs/session" "git.noahlan.cn/northlan/ngs/session"
"sync" "sync"
"sync/atomic" "sync/atomic"
) )

@ -1,8 +1,8 @@
package ngs package ngs
import ( import (
"git.noahlan.cn/northlan/ngs/session"
"math/rand" "math/rand"
"ngs/session"
"testing" "testing"
) )

@ -2,12 +2,12 @@ package ngs
import ( import (
"fmt" "fmt"
"ngs/cluster" "git.noahlan.cn/northlan/ngs/cluster"
"ngs/component" "git.noahlan.cn/northlan/ngs/component"
"ngs/internal/env" "git.noahlan.cn/northlan/ngs/internal/env"
"ngs/internal/log" "git.noahlan.cn/northlan/ngs/internal/log"
"ngs/internal/runtime" "git.noahlan.cn/northlan/ngs/internal/runtime"
"ngs/scheduler" "git.noahlan.cn/northlan/ngs/scheduler"
"os" "os"
"os/signal" "os/signal"
"path/filepath" "path/filepath"

@ -3,7 +3,7 @@ package codec
import ( import (
"bytes" "bytes"
"errors" "errors"
"ngs/internal/packet" "git.noahlan.cn/northlan/ngs/internal/packet"
) )
// Codec constants. // Codec constants.

@ -1,7 +1,7 @@
package codec package codec
import ( import (
. "ngs/internal/packet" . "git.noahlan.cn/northlan/ngs/internal/packet"
"reflect" "reflect"
"testing" "testing"
) )

@ -1,11 +1,11 @@
package env package env
import ( import (
"git.noahlan.cn/northlan/ngs/serialize"
"git.noahlan.cn/northlan/ngs/serialize/protobuf"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/credentials/insecure"
"net/http" "net/http"
"ngs/serialize"
"ngs/serialize/protobuf"
"time" "time"
) )

@ -4,7 +4,7 @@ import (
"encoding/binary" "encoding/binary"
"errors" "errors"
"fmt" "fmt"
"ngs/internal/log" "git.noahlan.cn/northlan/ngs/internal/log"
"strings" "strings"
) )

@ -1,6 +1,6 @@
package message package message
import "ngs/internal/env" import "git.noahlan.cn/northlan/ngs/internal/env"
func Serialize(v interface{}) ([]byte, error) { func Serialize(v interface{}) ([]byte, error) {
if data, ok := v.([]byte); ok { if data, ok := v.([]byte); ok {

@ -1,5 +1,5 @@
package runtime package runtime
import "ngs/cluster" import "git.noahlan.cn/northlan/ngs/cluster"
var CurrentNode *cluster.Node var CurrentNode *cluster.Node

@ -1,15 +1,15 @@
package ngs package ngs
import ( import (
"git.noahlan.cn/northlan/ngs/cluster"
"git.noahlan.cn/northlan/ngs/component"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/pipeline"
"git.noahlan.cn/northlan/ngs/serialize"
"google.golang.org/grpc" "google.golang.org/grpc"
"net/http" "net/http"
"ngs/cluster"
"ngs/component"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/pipeline"
"ngs/serialize"
"time" "time"
) )

@ -1,8 +1,8 @@
package pipeline package pipeline
import ( import (
"ngs/internal/message" "git.noahlan.cn/northlan/ngs/internal/message"
"ngs/session" "git.noahlan.cn/northlan/ngs/session"
"sync" "sync"
) )

@ -2,8 +2,8 @@ package scheduler
import ( import (
"fmt" "fmt"
"ngs/internal/env" "git.noahlan.cn/northlan/ngs/internal/env"
"ngs/internal/log" "git.noahlan.cn/northlan/ngs/internal/log"
"runtime/debug" "runtime/debug"
"sync/atomic" "sync/atomic"
"time" "time"

@ -2,8 +2,8 @@ package scheduler
import ( import (
"fmt" "fmt"
"git.noahlan.cn/northlan/ngs/internal/log"
"math" "math"
"ngs/internal/log"
"runtime/debug" "runtime/debug"
"sync" "sync"
"sync/atomic" "sync/atomic"

@ -2,7 +2,7 @@ package json
import ( import (
"encoding/json" "encoding/json"
"ngs/serialize" "git.noahlan.cn/northlan/ngs/serialize"
) )
// Serializer implements the serialize.Serializer interface // Serializer implements the serialize.Serializer interface

@ -2,8 +2,8 @@ package protobuf
import ( import (
"errors" "errors"
"git.noahlan.cn/northlan/ngs/serialize"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
"ngs/serialize"
) )
// ErrWrongValueType is the error used for marshal the value with protobuf encoding. // ErrWrongValueType is the error used for marshal the value with protobuf encoding.

@ -1,8 +1,8 @@
package protobuf package protobuf
import ( import (
"git.noahlan.cn/northlan/ngs/benchmark/testdata"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
"ngs/benchmark/testdata"
"testing" "testing"
) )

@ -2,8 +2,8 @@ package session
import ( import (
"errors" "errors"
"git.noahlan.cn/northlan/ngs/service"
"net" "net"
"ngs/service"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"

Loading…
Cancel
Save