Refactor kafka to pure Go (franz-go), fix DBC stubs, update Dockerfile
This commit is contained in:
@@ -12,13 +12,13 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/grpc/sms"
|
||||
"fiskerinc.com/modules/logger"
|
||||
"fiskerinc.com/modules/utils/randomvalues"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/sms"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/randomvalues"
|
||||
"github.com/pkg/errors"
|
||||
errorsO "errors"
|
||||
|
||||
tmtg "fiskerinc.com/modules/tmobtokengen"
|
||||
tmtg "github.com/fiskerinc/cloud-services/pkg/tmobtokengen"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/grpc/sms"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/sms"
|
||||
)
|
||||
|
||||
var CLIENT_ID = ""
|
||||
|
||||
@@ -12,9 +12,9 @@ import (
|
||||
|
||||
errorsO "errors"
|
||||
|
||||
"fiskerinc.com/modules/grpc/sms"
|
||||
tmtg "fiskerinc.com/modules/tmobtokengen"
|
||||
"fiskerinc.com/modules/utils/envtool"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/sms"
|
||||
tmtg "github.com/fiskerinc/cloud-services/pkg/tmobtokengen"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/grpc/sms"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/sms"
|
||||
)
|
||||
|
||||
// Want to make a client simulator that has a delay for each message, along with a chance of failure
|
||||
@@ -139,8 +139,8 @@ var _ TMobClienter = new(tmobileSimulator)
|
||||
// 10ms 6.25% 87.50% 10ms 6.25% runtime.read
|
||||
// 10ms 6.25% 93.75% 10ms 6.25% runtime.usleep
|
||||
// 10ms 6.25% 100% 10ms 6.25% runtime.write1
|
||||
// 0 0% 100% 20ms 12.50% fiskerinc.com/modules/tmobile.(*SMSClient).SendSMS
|
||||
// 0 0% 100% 10ms 6.25% fiskerinc.com/modules/tmobile.(*tmobileSimulator).SendSMS
|
||||
// 0 0% 100% 20ms 12.50% github.com/fiskerinc/cloud-services/pkg/tmobile.(*SMSClient).SendSMS
|
||||
// 0 0% 100% 10ms 6.25% github.com/fiskerinc/cloud-services/pkg/tmobile.(*tmobileSimulator).SendSMS
|
||||
// with default
|
||||
//BenchmarkSMSWrapper-16 1 5110808221 ns/op 2923960 B/op 43176 allocs/op no major difference
|
||||
// flat flat% sum% cum cum%
|
||||
@@ -150,7 +150,7 @@ var _ TMobClienter = new(tmobileSimulator)
|
||||
// 10ms 9.09% 81.82% 10ms 9.09% runtime.kevent
|
||||
// 10ms 9.09% 90.91% 10ms 9.09% runtime.stackpoolalloc
|
||||
// 10ms 9.09% 100% 10ms 9.09% runtime.usleep
|
||||
// 0 0% 100% 10ms 9.09% fiskerinc.com/modules/tmobile.BenchmarkSMSWrapper
|
||||
// 0 0% 100% 10ms 9.09% github.com/fiskerinc/cloud-services/pkg/tmobile.BenchmarkSMSWrapper
|
||||
// 0 0% 100% 10ms 9.09% runtime.copystack
|
||||
// 0 0% 100% 10ms 9.09% runtime.findObject
|
||||
// 0 0% 100% 60ms 54.55% runtime.findRunnable
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/grpc/sms"
|
||||
"fiskerinc.com/modules/tmobtokengen"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/sms"
|
||||
"github.com/fiskerinc/cloud-services/pkg/tmobtokengen"
|
||||
)
|
||||
|
||||
type mockTG struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package tmobile
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"fiskerinc.com/modules/utils/envtool"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
|
||||
)
|
||||
|
||||
type ICCIDFilter struct {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/tmobile"
|
||||
"github.com/fiskerinc/cloud-services/pkg/tmobile"
|
||||
)
|
||||
|
||||
func TestICCIDFilter(t *testing.T){
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/grpc/sms"
|
||||
"fiskerinc.com/modules/logger"
|
||||
"fiskerinc.com/modules/utils/envtool"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/sms"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
|
||||
)
|
||||
|
||||
var FISKER_TMOBILE_ACCOUNT_ID = envtool.GetEnv("FISKER_TMOBILE_ACCOUNT_ID", "500556839")
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/grpc/sms"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/sms"
|
||||
)
|
||||
|
||||
func TestSendSMSRequest_ExpireIfNotDelivered(t *testing.T) {
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/grpc/kafka_grpc"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/kafka_grpc"
|
||||
|
||||
"fiskerinc.com/modules/kafka"
|
||||
"fiskerinc.com/modules/logger"
|
||||
"fiskerinc.com/modules/utils/envtool"
|
||||
"github.com/fiskerinc/cloud-services/pkg/kafka"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"fiskerinc.com/modules/logger"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/grpc/sms"
|
||||
"fiskerinc.com/modules/kafka"
|
||||
"fiskerinc.com/modules/logger"
|
||||
"github.com/fiskerinc/cloud-services/pkg/grpc/sms"
|
||||
"github.com/fiskerinc/cloud-services/pkg/kafka"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user