feat 修改包路径
This commit is contained in:
12
app/app.go
12
app/app.go
@@ -2,12 +2,12 @@ package app
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/alex/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/module"
|
"git.hlsq.asia/alex/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/alex/service-gateway/config"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/grpcserver"
|
"git.hlsq.asia/alex/service-gateway/internal/grpcserver"
|
||||||
"github.com/judwhite/go-svc"
|
"github.com/judwhite/go-svc"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/module"
|
"git.hlsq.asia/alex/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/wshandler/login"
|
"git.hlsq.asia/alex/service-gateway/internal/handler/wshandler/login"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/module"
|
"git.hlsq.asia/alex/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/alex/service-gateway/config"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/net/httpgateway"
|
"git.hlsq.asia/alex/service-gateway/internal/net/httpgateway"
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ package app
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/module"
|
"git.hlsq.asia/alex/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/socket/websocket"
|
"git.hlsq.asia/alex/service-common/net/socket/websocket"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/alex/service-gateway/config"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/net/wsgateway"
|
"git.hlsq.asia/alex/service-gateway/internal/net/wsgateway"
|
||||||
"github.com/panjf2000/gnet/v2"
|
"github.com/panjf2000/gnet/v2"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import "git.hlsq.asia/mmorpg/service-common/config"
|
import "git.hlsq.asia/alex/service-common/config"
|
||||||
|
|
||||||
const path = "./config"
|
const path = "./config"
|
||||||
|
|
||||||
|
|||||||
2
deploy/Jenkinsfile
vendored
2
deploy/Jenkinsfile
vendored
@@ -3,7 +3,7 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
// 仓库
|
// 仓库
|
||||||
REPO_URL = 'https://git.hlsq.asia/mmorpg/service-gateway.git'
|
REPO_URL = 'https://git.hlsq.asia/alex/service-gateway.git'
|
||||||
REPO_CREDENTIALS_ID = '80805ba2-f4ac-4d84-aee6-d4cce5fc0a96'
|
REPO_CREDENTIALS_ID = '80805ba2-f4ac-4d84-aee6-d4cce5fc0a96'
|
||||||
|
|
||||||
// Registry
|
// Registry
|
||||||
|
|||||||
4
go.mod
4
go.mod
@@ -1,10 +1,10 @@
|
|||||||
module git.hlsq.asia/mmorpg/service-gateway
|
module git.hlsq.asia/alex/service-gateway
|
||||||
|
|
||||||
go 1.24.0
|
go 1.24.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
bou.ke/monkey v1.0.2
|
bou.ke/monkey v1.0.2
|
||||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260211064821-558677bc3a2e
|
git.hlsq.asia/alex/service-common v0.0.0-20260211064821-558677bc3a2e
|
||||||
github.com/alicebob/miniredis/v2 v2.35.0
|
github.com/alicebob/miniredis/v2 v2.35.0
|
||||||
github.com/gin-contrib/cors v1.7.6
|
github.com/gin-contrib/cors v1.7.6
|
||||||
github.com/gin-gonic/gin v1.11.0
|
github.com/gin-gonic/gin v1.11.0
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ package grpcserver
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/sspb"
|
"git.hlsq.asia/alex/service-common/proto/ss/sspb"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/wshandler/client"
|
"git.hlsq.asia/alex/service-gateway/internal/handler/wshandler/client"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package grpcserver
|
package grpcserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/config"
|
"git.hlsq.asia/alex/service-common/config"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/alex/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
"git.hlsq.asia/alex/service-common/net/grpc/service"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package httphandler
|
package httphandler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpcclient"
|
"git.hlsq.asia/alex/service-common/net/grpc/grpcclient"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
"git.hlsq.asia/alex/service-common/net/http/httpresp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package httphandler
|
|||||||
import (
|
import (
|
||||||
"bou.ke/monkey"
|
"bou.ke/monkey"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpcclient"
|
"git.hlsq.asia/alex/service-common/net/grpc/grpcclient"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
"git.hlsq.asia/alex/service-common/net/http/httpresp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb/mocks"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb/mocks"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/testutil"
|
"git.hlsq.asia/alex/service-gateway/internal/testutil"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package httphandler
|
package httphandler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/alex/service-gateway/config"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package client
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/socket"
|
"git.hlsq.asia/alex/service-common/net/socket"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"sync"
|
"sync"
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package client
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpcclient"
|
"git.hlsq.asia/alex/service-common/net/grpc/grpcclient"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/sspb"
|
"git.hlsq.asia/alex/service-common/proto/ss/sspb"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/sspb"
|
"git.hlsq.asia/alex/service-common/proto/ss/sspb"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ package login
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpcclient"
|
"git.hlsq.asia/alex/service-common/net/grpc/grpcclient"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/sspb"
|
"git.hlsq.asia/alex/service-common/proto/ss/sspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/wshandler/client"
|
"git.hlsq.asia/alex/service-gateway/internal/handler/wshandler/client"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package login
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/wshandler/client"
|
"git.hlsq.asia/alex/service-gateway/internal/handler/wshandler/client"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package httpgateway
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
"git.hlsq.asia/alex/service-common/net/http/httpresp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
"git.hlsq.asia/alex/service-gateway/internal/global"
|
||||||
"github.com/gin-contrib/cors"
|
"github.com/gin-contrib/cors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package httpgateway
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/alex/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpcclient"
|
"git.hlsq.asia/alex/service-common/net/grpc/grpcclient"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
"git.hlsq.asia/alex/service-common/net/http/httpresp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/httphandler"
|
"git.hlsq.asia/alex/service-gateway/internal/handler/httphandler"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/net/httpgateway/wrapper"
|
"git.hlsq.asia/alex/service-gateway/internal/net/httpgateway/wrapper"
|
||||||
"github.com/gin-contrib/cors"
|
"github.com/gin-contrib/cors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package wrapper
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
"git.hlsq.asia/alex/service-common/net/http/httpresp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rscommon"
|
"git.hlsq.asia/alex/service-common/proto/rs/rscommon"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package wrapper
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
"git.hlsq.asia/alex/service-common/net/http/httpresp"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
"io"
|
"io"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package wsgateway
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/socket"
|
"git.hlsq.asia/alex/service-common/net/socket"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/wshandler/client"
|
"git.hlsq.asia/alex/service-gateway/internal/handler/wshandler/client"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/internal/handler/wshandler/login"
|
"git.hlsq.asia/alex/service-gateway/internal/handler/wshandler/login"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package testutil
|
package testutil
|
||||||
|
|
||||||
import (
|
import (
|
||||||
config2 "git.hlsq.asia/mmorpg/service-common/config"
|
config2 "git.hlsq.asia/alex/service-common/config"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/alex/service-gateway/config"
|
||||||
"github.com/alicebob/miniredis/v2"
|
"github.com/alicebob/miniredis/v2"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
)
|
)
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -2,8 +2,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/app"
|
"git.hlsq.asia/alex/service-gateway/app"
|
||||||
"git.hlsq.asia/mmorpg/service-gateway/config"
|
"git.hlsq.asia/alex/service-gateway/config"
|
||||||
"github.com/judwhite/go-svc"
|
"github.com/judwhite/go-svc"
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user