!83 更新 mod 号为 wheat-os

Merge pull request !83 from bandl/refactor-mod
This commit is contained in:
bandl 2021-11-02 06:46:09 +00:00 committed by Gitee
commit be528cbb6d
51 changed files with 117 additions and 115 deletions

View File

@ -1,8 +1,8 @@
package client
import (
"gitee.com/timedb/wheatCache/client/middle"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/client/middle"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"google.golang.org/grpc"
)

View File

@ -4,8 +4,8 @@ import (
"context"
"testing"
"gitee.com/timedb/wheatCache/client/middle"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/client/middle"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"github.com/stretchr/testify/require"
)

View File

@ -3,7 +3,7 @@ package middle
import (
"context"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"

View File

@ -7,9 +7,9 @@ package dao
import (
"testing"
_ "gitee.com/timedb/wheatCache/conf"
"gitee.com/timedb/wheatCache/pkg/lru"
"gitee.com/timedb/wheatCache/pkg/proto"
_ "gitee.com/wheat-os/wheatCache/conf"
"gitee.com/wheat-os/wheatCache/pkg/lru"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"github.com/stretchr/testify/require"
)

View File

@ -4,12 +4,12 @@ import (
"fmt"
"net"
_ "gitee.com/timedb/wheatCache/conf"
wheatCodec "gitee.com/timedb/wheatCache/gateway/codec"
"gitee.com/timedb/wheatCache/gateway/proxy"
"gitee.com/timedb/wheatCache/gateway/transport"
"gitee.com/timedb/wheatCache/pkg/logx"
"gitee.com/timedb/wheatCache/pkg/util/server"
_ "gitee.com/wheat-os/wheatCache/conf"
wheatCodec "gitee.com/wheat-os/wheatCache/gateway/codec"
"gitee.com/wheat-os/wheatCache/gateway/proxy"
"gitee.com/wheat-os/wheatCache/gateway/transport"
"gitee.com/wheat-os/wheatCache/pkg/logx"
"gitee.com/wheat-os/wheatCache/pkg/util/server"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"google.golang.org/grpc"

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
package main
import "gitee.com/timedb/wheatCache/gateway/cmd"
import "gitee.com/wheat-os/wheatCache/gateway/cmd"
func main() {
cmd.Execute()

View File

@ -3,7 +3,7 @@ package proxy
import (
"context"
"gitee.com/timedb/wheatCache/gateway/transport"
"gitee.com/wheat-os/wheatCache/gateway/transport"
"google.golang.org/grpc"
)

View File

@ -3,9 +3,9 @@ package proxy
import (
"context"
"gitee.com/timedb/wheatCache/gateway/codec"
"gitee.com/timedb/wheatCache/gateway/transport"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/gateway/codec"
"gitee.com/wheat-os/wheatCache/gateway/transport"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"

View File

@ -4,8 +4,8 @@ import (
"context"
"io"
wheatCodec "gitee.com/timedb/wheatCache/gateway/codec"
"gitee.com/timedb/wheatCache/gateway/transport"
wheatCodec "gitee.com/wheat-os/wheatCache/gateway/codec"
"gitee.com/wheat-os/wheatCache/gateway/transport"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

View File

@ -5,7 +5,7 @@ import (
"sort"
"strconv"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
)
type HashFunc func(data []byte) uint32

2
go.mod
View File

@ -1,4 +1,4 @@
module gitee.com/timedb/wheatCache
module gitee.com/wheat-os/wheatCache
go 1.16

View File

@ -4,7 +4,7 @@ import (
"sync/atomic"
"time"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
)
// 事件 poll 降低 new 对象的频率

View File

@ -2,9 +2,10 @@ package logx
import (
"context"
"gitee.com/timedb/wheatCache/pkg/event"
"github.com/spf13/viper"
"sync"
"gitee.com/wheat-os/wheatCache/pkg/event"
"github.com/spf13/viper"
)
type LogLevelState int8

View File

@ -8,8 +8,8 @@ import (
"strings"
"time"
"gitee.com/timedb/wheatCache/pkg/event"
middleMsg "gitee.com/timedb/wheatCache/pkg/middle-msg"
"gitee.com/wheat-os/wheatCache/pkg/event"
middleMsg "gitee.com/wheat-os/wheatCache/pkg/middle-msg"
)
func With(ctx context.Context, p event.ProduceInterface) *upLogger {

View File

@ -2,9 +2,10 @@ package logx
import (
"context"
_ "gitee.com/timedb/wheatCache/conf"
"gitee.com/timedb/wheatCache/pkg/event"
"testing"
_ "gitee.com/wheat-os/wheatCache/conf"
"gitee.com/wheat-os/wheatCache/pkg/event"
)
func TestStd(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"sync"
"time"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/structure"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/structure"
)
type SingleWorkFunc func() interface{}

View File

@ -4,13 +4,13 @@ import (
"container/list"
"sync/atomic"
_ "gitee.com/timedb/wheatCache/conf"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/timedb/wheatCache/pkg/middle"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/structure"
"gitee.com/timedb/wheatCache/pkg/util"
_ "gitee.com/wheat-os/wheatCache/conf"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/event"
"gitee.com/wheat-os/wheatCache/pkg/middle"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/structure"
"gitee.com/wheat-os/wheatCache/pkg/util"
"github.com/spf13/viper"
)

View File

@ -5,8 +5,8 @@ import (
"testing"
"time"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/structure/stringx"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/structure/stringx"
"github.com/stretchr/testify/require"
)

View File

@ -4,8 +4,8 @@ import (
"sync"
"time"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/util/skiplist"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/util/skiplist"
)
// lru 的 ttl 管理器

View File

@ -5,8 +5,8 @@ import (
"testing"
"time"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/structure/stringx"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/structure/stringx"
"github.com/stretchr/testify/require"
)

View File

@ -5,10 +5,10 @@ import (
"testing"
"time"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/timedb/wheatCache/pkg/logx"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/structure/stringx"
"gitee.com/wheat-os/wheatCache/pkg/event"
"gitee.com/wheat-os/wheatCache/pkg/logx"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/structure/stringx"
"github.com/stretchr/testify/require"
)

View File

@ -4,10 +4,10 @@ import (
"context"
"time"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/timedb/wheatCache/pkg/logx"
mMsg "gitee.com/timedb/wheatCache/pkg/middle-msg"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/event"
"gitee.com/wheat-os/wheatCache/pkg/logx"
mMsg "gitee.com/wheat-os/wheatCache/pkg/middle-msg"
)
func (lru *SingleCache) lruSingleWork() {

View File

@ -3,8 +3,8 @@ package middlemsg
import (
"context"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/event"
)
const (

View File

@ -1,10 +1,10 @@
package middle
import (
_ "gitee.com/timedb/wheatCache/conf"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/timedb/wheatCache/plugins"
"gitee.com/timedb/wheatCache/plugins/config"
_ "gitee.com/wheat-os/wheatCache/conf"
"gitee.com/wheat-os/wheatCache/pkg/event"
"gitee.com/wheat-os/wheatCache/plugins"
"gitee.com/wheat-os/wheatCache/plugins/config"
"github.com/spf13/viper"
)

View File

@ -3,8 +3,8 @@ package middle
import (
"context"
"gitee.com/timedb/wheatCache/pkg/logx"
middleMsg "gitee.com/timedb/wheatCache/pkg/middle-msg"
"gitee.com/wheat-os/wheatCache/pkg/logx"
middleMsg "gitee.com/wheat-os/wheatCache/pkg/middle-msg"
)
func (m *MiddleWare) startWork() {

View File

@ -6,8 +6,8 @@ import (
"testing"
"time"
"gitee.com/timedb/wheatCache/pkg/event"
middleMsg "gitee.com/timedb/wheatCache/pkg/middle-msg"
"gitee.com/wheat-os/wheatCache/pkg/event"
middleMsg "gitee.com/wheat-os/wheatCache/pkg/middle-msg"
)
func Test_middleware_loadPlugins(t *testing.T) {

View File

@ -1,8 +1,8 @@
package listx
import (
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/structure"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/structure"
)
/*

View File

@ -3,8 +3,8 @@ package stringx
import (
"strconv"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/structure"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/structure"
)
type StringSingle struct {

View File

@ -5,7 +5,7 @@ import (
"testing"
"unsafe"
"gitee.com/timedb/wheatCache/pkg/structure"
"gitee.com/wheat-os/wheatCache/pkg/structure"
"github.com/stretchr/testify/require"
)

View File

@ -6,7 +6,7 @@ import (
"math"
"strconv"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
)
// Value 提供一个基础的 动态类型

View File

@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
)
// ParseSizeToBit

View File

@ -5,7 +5,7 @@ import (
"os/signal"
"syscall"
"gitee.com/timedb/wheatCache/pkg/logx"
"gitee.com/wheat-os/wheatCache/pkg/logx"
"google.golang.org/grpc"
)

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
"gitee.com/timedb/wheatCache/pkg/logx"
"gitee.com/wheat-os/wheatCache/pkg/logx"
"github.com/stretchr/testify/require"
)

View File

@ -4,9 +4,9 @@
package config
import (
"gitee.com/timedb/wheatCache/plugins"
"gitee.com/wheat-os/wheatCache/plugins"
mockPlugin "gitee.com/timedb/wheatCache/plugins/mock-plugin"
mockPlugin "gitee.com/wheat-os/wheatCache/plugins/mock-plugin"
)
func GetMiddlewareMap() map[string]plugins.PluginInterface {

View File

@ -4,9 +4,9 @@
package config
import (
"gitee.com/timedb/wheatCache/plugins"
"gitee.com/wheat-os/wheatCache/plugins"
{%for dir in dirs %}
{{dir[0]}} "gitee.com/timedb/wheatCache/plugins/{{dir[1]}}"
{{dir[0]}} "gitee.com/wheat-os/wheatCache/plugins/{{dir[1]}}"
{%- endfor%}
)

View File

@ -5,8 +5,8 @@ import (
"net/http"
_ "net/http/pprof"
_ "gitee.com/timedb/wheatCache/conf"
"gitee.com/timedb/wheatCache/pkg/logx"
_ "gitee.com/wheat-os/wheatCache/conf"
"gitee.com/wheat-os/wheatCache/pkg/logx"
"github.com/spf13/viper"
)

View File

@ -6,12 +6,12 @@ import (
"log"
"net"
"gitee.com/timedb/wheatCache/storage/service"
"gitee.com/wheat-os/wheatCache/storage/service"
_ "gitee.com/timedb/wheatCache/conf"
"gitee.com/timedb/wheatCache/pkg/logx"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/util/server"
_ "gitee.com/wheat-os/wheatCache/conf"
"gitee.com/wheat-os/wheatCache/pkg/logx"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/util/server"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"google.golang.org/grpc"

View File

@ -1,7 +1,7 @@
package dao
import (
"gitee.com/timedb/wheatCache/pkg/lru"
"gitee.com/wheat-os/wheatCache/pkg/lru"
)
type Dao struct {

View File

@ -1,5 +1,5 @@
package dao
import (
_ "gitee.com/timedb/wheatCache/conf"
_ "gitee.com/wheat-os/wheatCache/conf"
)

View File

@ -3,7 +3,7 @@
package dao
import "gitee.com/timedb/wheatCache/pkg/proto"
import "gitee.com/wheat-os/wheatCache/pkg/proto"
type Interface interface {
LIndex(*proto.BaseKey, int32) (*proto.LIndexResponse, error)

View File

@ -1,10 +1,10 @@
package dao
import (
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/structure"
"gitee.com/timedb/wheatCache/pkg/structure/listx"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/structure"
"gitee.com/wheat-os/wheatCache/pkg/structure/listx"
)
func (d *Dao) LIndex(key *proto.BaseKey, index int32) (*proto.LIndexResponse, error) {

View File

@ -1,10 +1,10 @@
package dao
import (
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/structure"
"gitee.com/timedb/wheatCache/pkg/structure/stringx"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/structure"
"gitee.com/wheat-os/wheatCache/pkg/structure/stringx"
)
// stringx 相关的方法

View File

@ -16,7 +16,7 @@ limitations under the License.
package main
import (
"gitee.com/timedb/wheatCache/storage/cmd"
"gitee.com/wheat-os/wheatCache/storage/cmd"
)
func main() {

View File

@ -6,8 +6,8 @@ import (
"sync/atomic"
"time"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/logx"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/logx"
protobuf "google.golang.org/protobuf/proto"
)

View File

@ -9,7 +9,7 @@ import (
"testing"
"time"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"github.com/stretchr/testify/require"
)

View File

@ -7,8 +7,8 @@ import (
"encoding/hex"
"fmt"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/proto"
protobuf "google.golang.org/protobuf/proto"
)

View File

@ -3,12 +3,12 @@ package service
import (
"time"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/timedb/wheatCache/pkg/lru"
"gitee.com/timedb/wheatCache/pkg/middle"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/storage/dao"
"gitee.com/timedb/wheatCache/storage/persisted"
"gitee.com/wheat-os/wheatCache/pkg/event"
"gitee.com/wheat-os/wheatCache/pkg/lru"
"gitee.com/wheat-os/wheatCache/pkg/middle"
"gitee.com/wheat-os/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/storage/dao"
"gitee.com/wheat-os/wheatCache/storage/persisted"
"github.com/spf13/viper"
)

View File

@ -5,9 +5,9 @@ package service
import (
context "context"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/timedb/wheatCache/pkg/lru"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/event"
"gitee.com/wheat-os/wheatCache/pkg/lru"
"gitee.com/wheat-os/wheatCache/pkg/proto"
)
func (s *singleService) LIndex(

View File

@ -7,8 +7,8 @@ import (
"encoding/hex"
"fmt"
"gitee.com/timedb/wheatCache/pkg/errorx"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/errorx"
"gitee.com/wheat-os/wheatCache/pkg/proto"
protobuf "google.golang.org/protobuf/proto"
)

View File

@ -3,7 +3,7 @@
package dao
import "gitee.com/timedb/wheatCache/pkg/proto"
import "gitee.com/wheat-os/wheatCache/pkg/proto"
type Interface interface {
{%for key in keys %}

View File

@ -5,9 +5,9 @@ package service
import (
context "context"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/timedb/wheatCache/pkg/lru"
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/wheat-os/wheatCache/pkg/event"
"gitee.com/wheat-os/wheatCache/pkg/lru"
"gitee.com/wheat-os/wheatCache/pkg/proto"
)
{% for key in keys %}