Skip to content

Commit

Permalink
v5.0.2-rc-golang
Browse files Browse the repository at this point in the history
  • Loading branch information
xdkxlk committed Feb 7, 2023
1 parent 2ff904e commit faf12a2
Show file tree
Hide file tree
Showing 36 changed files with 73 additions and 72 deletions.
8 changes: 4 additions & 4 deletions golang/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"sync"
"time"

innerMD "github.com/apache/rocketmq-clients/golang/metadata"
"github.com/apache/rocketmq-clients/golang/pkg/ticker"
"github.com/apache/rocketmq-clients/golang/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
innerMD "github.com/apache/rocketmq-clients/golang/v5/metadata"
"github.com/apache/rocketmq-clients/golang/v5/pkg/ticker"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"github.com/google/uuid"
"go.uber.org/atomic"
"go.uber.org/zap"
Expand Down
6 changes: 3 additions & 3 deletions golang/client_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"sync"
"time"

"github.com/apache/rocketmq-clients/golang/pkg/ticker"
"github.com/apache/rocketmq-clients/golang/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
"github.com/apache/rocketmq-clients/golang/v5/pkg/ticker"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
2 changes: 1 addition & 1 deletion golang/client_manager_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
reflect "reflect"
time "time"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
gomock "github.com/golang/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion golang/client_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"testing"
"time"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
gomock "github.com/golang/mock/gomock"
"github.com/prashantv/gostub"
"google.golang.org/grpc/metadata"
Expand Down
2 changes: 1 addition & 1 deletion golang/client_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
context "context"
reflect "reflect"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
gomock "github.com/golang/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion golang/client_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package golang
import (
"time"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
)

type clientOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion golang/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"
"time"

"github.com/apache/rocketmq-clients/golang/credentials"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
gomock "github.com/golang/mock/gomock"
"github.com/prashantv/gostub"
)
Expand Down
2 changes: 1 addition & 1 deletion golang/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package golang

import "github.com/apache/rocketmq-clients/golang/credentials"
import "github.com/apache/rocketmq-clients/golang/v5/credentials"

type Config struct {
Endpoint string `validate:"required"`
Expand Down
2 changes: 1 addition & 1 deletion golang/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"errors"
"fmt"

"github.com/apache/rocketmq-clients/golang/pkg/grpc/middleware/zaplog"
"github.com/apache/rocketmq-clients/golang/v5/pkg/grpc/middleware/zaplog"
validator "github.com/go-playground/validator/v10"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down
2 changes: 1 addition & 1 deletion golang/conn_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"math"
"time"

"github.com/apache/rocketmq-clients/golang/pkg/zaplog"
"github.com/apache/rocketmq-clients/golang/v5/pkg/zaplog"
"go.uber.org/zap"
"google.golang.org/grpc"
)
Expand Down
2 changes: 1 addition & 1 deletion golang/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package golang
import (
"time"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
)

type Consumer interface {
Expand Down
2 changes: 1 addition & 1 deletion golang/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
)

type ErrRpcStatus struct {
Expand Down
4 changes: 2 additions & 2 deletions golang/example/consumer/simple_consumer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"os"
"time"

rmq_client "github.com/apache/rocketmq-clients/golang"
"github.com/apache/rocketmq-clients/golang/credentials"
rmq_client "github.com/apache/rocketmq-clients/golang/v5"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions golang/example/producer/async/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strconv"
"time"

rmq_client "github.com/apache/rocketmq-clients/golang"
"github.com/apache/rocketmq-clients/golang/credentials"
rmq_client "github.com/apache/rocketmq-clients/golang/v5"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions golang/example/producer/delay/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strconv"
"time"

rmq_client "github.com/apache/rocketmq-clients/golang"
"github.com/apache/rocketmq-clients/golang/credentials"
rmq_client "github.com/apache/rocketmq-clients/golang/v5"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions golang/example/producer/fifo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strconv"
"time"

rmq_client "github.com/apache/rocketmq-clients/golang"
"github.com/apache/rocketmq-clients/golang/credentials"
rmq_client "github.com/apache/rocketmq-clients/golang/v5"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions golang/example/producer/normal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strconv"
"time"

rmq_client "github.com/apache/rocketmq-clients/golang"
"github.com/apache/rocketmq-clients/golang/credentials"
rmq_client "github.com/apache/rocketmq-clients/golang/v5"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions golang/example/producer/transaction/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strconv"
"time"

rmq_client "github.com/apache/rocketmq-clients/golang"
"github.com/apache/rocketmq-clients/golang/credentials"
rmq_client "github.com/apache/rocketmq-clients/golang/v5"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion golang/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/apache/rocketmq-clients/golang
module github.com/apache/rocketmq-clients/golang/v5

go 1.17

Expand Down
4 changes: 2 additions & 2 deletions golang/loadBalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"sync"
"sync/atomic"

"github.com/apache/rocketmq-clients/golang/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"github.com/dchest/siphash"
// "github.com/dchest/siphash"
)
Expand Down
2 changes: 1 addition & 1 deletion golang/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strconv"
"strings"

"github.com/apache/rocketmq-clients/golang/pkg/utils"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
"github.com/natefinch/lumberjack"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
Expand Down
4 changes: 2 additions & 2 deletions golang/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strconv"
"time"

"github.com/apache/rocketmq-clients/golang/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down
35 changes: 18 additions & 17 deletions golang/message_id_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ import (
"sync/atomic"
"time"

"github.com/apache/rocketmq-clients/golang/pkg/utils"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
)

/**
/*
*
The codec for the message-id.
Codec here provides the following two functions:
Expand All @@ -44,26 +45,26 @@ number. For V1, these two bytes are 0x0001.
V1 message id example
┌──┬────────────┬────┬────────┬────────┐
│01│56F7E71C361B│21BC│024CCDBE│00000000│
└──┴────────────┴────┴────────┴────────┘
┌──┬────────────┬────┬────────┬────────┐
│01│56F7E71C361B│21BC│024CCDBE│00000000│
└──┴────────────┴────┴────────┴────────┘
V1 version message id generation rules
process id(lower 2bytes)
process id(lower 2bytes)
mac address(lower 6bytes) │ sequence number(big endian)
▲ │ ▲ (4bytes)
│ │ │
┌─────┴─────┐ ┌┴┐ ┌───┐ ┌─┴─┐
0x01+ │ 6 │ │2│ │ 4 │ │ 4 │
└───────────┘ └─┘ └─┬─┘ └───┘
seconds since 2021-01-01 00:00:00(UTC+0)
(lower 4bytes)
▲ │ ▲ (4bytes)
│ │ │
┌─────┴─────┐ ┌┴┐ ┌───┐ ┌─┴─┐
0x01+ │ 6 │ │2│ │ 4 │ │ 4 │
└───────────┘ └─┘ └─┬─┘ └───┘
seconds since 2021-01-01 00:00:00(UTC+0)
(lower 4bytes)
*/
type MessageIdCodec interface {
NextMessageId() MessageId
Expand Down
4 changes: 2 additions & 2 deletions golang/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"time"

"contrib.go.opencensus.io/exporter/ocagent"
"github.com/apache/rocketmq-clients/golang/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
Expand Down
2 changes: 1 addition & 1 deletion golang/pkg/grpc/middleware/zaplog/zaplog.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"context"
"time"

"github.com/apache/rocketmq-clients/golang/pkg/zaplog/ctxzap"
"github.com/apache/rocketmq-clients/golang/v5/pkg/zaplog/ctxzap"

"go.uber.org/zap"
"google.golang.org/grpc"
Expand Down
4 changes: 2 additions & 2 deletions golang/pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"sync/atomic"
"time"

"github.com/apache/rocketmq-clients/golang/metadata"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
"github.com/apache/rocketmq-clients/golang/v5/metadata"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"github.com/valyala/fastrand"
"go.opencensus.io/trace"
MD "google.golang.org/grpc/metadata"
Expand Down
2 changes: 1 addition & 1 deletion golang/pkg/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"compress/gzip"
"testing"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
)

func TestMod(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions golang/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"sync"
"time"

"github.com/apache/rocketmq-clients/golang/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"google.golang.org/protobuf/types/known/durationpb"
)

Expand Down
2 changes: 1 addition & 1 deletion golang/producer_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"sync"
"time"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"google.golang.org/protobuf/types/known/durationpb"
)

Expand Down
4 changes: 2 additions & 2 deletions golang/producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"testing"
"time"

"github.com/apache/rocketmq-clients/golang/credentials"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
gomock "github.com/golang/mock/gomock"
"github.com/prashantv/gostub"
)
Expand Down
4 changes: 2 additions & 2 deletions golang/publishing_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ package golang
import (
"fmt"

innerOS "github.com/apache/rocketmq-clients/golang/pkg/os"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
innerOS "github.com/apache/rocketmq-clients/golang/v5/pkg/os"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down
2 changes: 1 addition & 1 deletion golang/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"sync/atomic"
"time"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
// "google.golang.org/protobuf/types/known/durationpb"
)

Expand Down
2 changes: 1 addition & 1 deletion golang/rpc_client_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
reflect "reflect"
time "time"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
gomock "github.com/golang/mock/gomock"
)

Expand Down
4 changes: 2 additions & 2 deletions golang/simple_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"sync/atomic"
"time"

"github.com/apache/rocketmq-clients/golang/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
"github.com/apache/rocketmq-clients/golang/v5/pkg/utils"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"google.golang.org/protobuf/types/known/durationpb"
"google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down
2 changes: 1 addition & 1 deletion golang/simple_consumer_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"time"

v2 "github.com/apache/rocketmq-clients/golang/protocol/v2"
v2 "github.com/apache/rocketmq-clients/golang/v5/protocol/v2"
"google.golang.org/protobuf/types/known/durationpb"
)

Expand Down
Loading

0 comments on commit faf12a2

Please sign in to comment.