Update the libray reference path to new repo
Signed-off-by: Tao Jiang <taoj@vmware.com>
This commit is contained in:
parent
aabb88c35b
commit
86cc5a1a64
33 changed files with 105 additions and 104 deletions
71
README.md
71
README.md
|
|
@ -1,25 +1,51 @@
|
||||||
# vmware-go-kcl-v2
|
# VMWare Go KCL v2
|
||||||
|
|
||||||
|
[](https://goreportcard.com/report/github.com/vmware/vmware-go-kcl)
|
||||||
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://github.com/fafg/vmware-go-kcl/actions/workflows/vmware-go-kcl-v2-ci.yml)
|
[](https://github.com/fafg/vmware-go-kcl/actions/workflows/vmware-go-kcl-v2-ci.yml)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
VMware-Go-KCL is a native open-source Go library for Amazon Kinesis Data Stream (KDS) consumption. It allows developers
|
||||||
|
to program KDS consumers in lightweight Go language and still take advantage of the features presented by the native
|
||||||
|
KDS Java API libraries.
|
||||||
|
|
||||||
|
[vmware-go-kcl](https://github.com/vmware/vmware-go-kcl) is a VMWare originated open-source project for AWS Kinesis
|
||||||
|
Client Library in Go. Within VMware, we have seen adoption in vSecureState and Carbon Black. In addition, Carbon Black
|
||||||
|
has contributed to the vmware-go-kcl codebase and heavily used it in the product. Besides,
|
||||||
|
[vmware-go-kcl](https://github.com/vmware/vmware-go-kcl) has got
|
||||||
|
[recognition](https://www.linkedin.com/posts/adityakrish_vmware-go-kcl-a-native-open-source-go-programming-activity-6810626798133616640-B6W8/),
|
||||||
|
and [contributions](https://github.com/vmware/vmware-go-kcl/graphs/contributors) from the industry.
|
||||||
|
|
||||||
|
`vmware-go-kcl-v2` is the v2 version of VMWare KCL for the Go programming language by utilizing [AWS Go SDK V2](https://github.com/aws/aws-sdk-go-v2).
|
||||||
|
|
||||||
## Try it out
|
## Try it out
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
* Prereq 1
|
* [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2)
|
||||||
* Prereq 2
|
* The v2 SDK requires a minimum version of `Go 1.17`.
|
||||||
* Prereq 3
|
* [gosec](https://github.com/securego/gosec)
|
||||||
|
|
||||||
### Build & Run
|
### Build & Run
|
||||||
|
|
||||||
1. Step 1
|
1. Initialize Project
|
||||||
2. Step 2
|
2. Build
|
||||||
3. Step 3
|
|
||||||
|
`make build`
|
||||||
|
|
||||||
|
3. Test
|
||||||
|
|
||||||
|
`make test`
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
VMware-Go-KCL matches exactly the same interface and programming model from original Amazon KCL, the best place for getting reference, tutorial is from Amazon itself:
|
||||||
|
|
||||||
|
- [Developing Consumers Using the Kinesis Client Library](https://docs.aws.amazon.com/streams/latest/dev/developing-consumers-with-kcl.html)
|
||||||
|
- [Troubleshooting](https://docs.aws.amazon.com/streams/latest/dev/troubleshooting-consumers.html)
|
||||||
|
- [Advanced Topics](https://docs.aws.amazon.com/streams/latest/dev/advanced-consumers.html)
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
The vmware-go-kcl-v2 project team welcomes contributions from the community. Before you start working with vmware-go-kcl-v2, please
|
The vmware-go-kcl-v2 project team welcomes contributions from the community. Before you start working with vmware-go-kcl-v2, please
|
||||||
|
|
@ -29,35 +55,4 @@ as an open-source patch. For more detailed information, refer to [CONTRIBUTING.m
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
### Build & Run
|
|
||||||
|
|
||||||
```sh
|
|
||||||
hmake
|
|
||||||
|
|
||||||
# security scan
|
|
||||||
hmake scanast
|
|
||||||
|
|
||||||
# run test
|
|
||||||
hmake check
|
|
||||||
|
|
||||||
# run integration test
|
|
||||||
# update the worker_test.go to let it point to your Kinesis stream
|
|
||||||
hmake test
|
|
||||||
```
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
VMware-Go-KCL matches exactly the same interface and programming model from original Amazon KCL, the best place for getting reference, tutorial is from Amazon itself:
|
|
||||||
|
|
||||||
- [Developing Consumers Using the Kinesis Client Library](https://docs.aws.amazon.com/streams/latest/dev/developing-consumers-with-kcl.html)
|
|
||||||
- [Troubleshooting](https://docs.aws.amazon.com/streams/latest/dev/troubleshooting-consumers.html)
|
|
||||||
- [Advanced Topics](https://docs.aws.amazon.com/streams/latest/dev/advanced-consumers.html)
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
The vmware-go-kcl project team welcomes contributions from the community. Before you start working with vmware-go-kcl, please read our [Developer Certificate of Origin](https://cla.vmware.com/dco). All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch. For more detailed information, refer to [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT License
|
MIT License
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
par "github.com/vmware/vmware-go-kcl/clientlibrary/partition"
|
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,9 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
|
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
|
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
par "github.com/vmware/vmware-go-kcl/clientlibrary/partition"
|
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
|
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
cfg "github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
cfg "github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
par "github.com/vmware/vmware-go-kcl/clientlibrary/partition"
|
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDoesTableExist(t *testing.T) {
|
func TestDoesTableExist(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
* express or implied. See the License for the specific language governing
|
* express or implied. See the License for the specific language governing
|
||||||
* permissions and limitations under the License.
|
* permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
@ -44,8 +45,8 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
"github.com/aws/aws-sdk-go-v2/aws"
|
||||||
"github.com/aws/aws-sdk-go-v2/credentials"
|
"github.com/aws/aws-sdk-go-v2/credentials"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/metrics"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestConfig(t *testing.T) {
|
func TestConfig(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
* express or implied. See the License for the specific language governing
|
* express or implied. See the License for the specific language governing
|
||||||
* permissions and limitations under the License.
|
* permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
* express or implied. See the License for the specific language governing
|
* express or implied. See the License for the specific language governing
|
||||||
* permissions and limitations under the License.
|
* permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
@ -41,9 +42,9 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go-v2/credentials"
|
"github.com/aws/aws-sdk-go-v2/credentials"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/metrics"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/utils"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/utils"
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewKinesisClientLibConfig creates a default KinesisClientLibConfiguration based on the required fields.
|
// NewKinesisClientLibConfig creates a default KinesisClientLibConfiguration based on the required fields.
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
* express or implied. See the License for the specific language governing
|
* express or implied. See the License for the specific language governing
|
||||||
* permissions and limitations under the License.
|
* permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package interfaces
|
package interfaces
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
* express or implied. See the License for the specific language governing
|
* express or implied. See the License for the specific language governing
|
||||||
* permissions and limitations under the License.
|
* permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package interfaces
|
package interfaces
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
* express or implied. See the License for the specific language governing
|
* express or implied. See the License for the specific language governing
|
||||||
* permissions and limitations under the License.
|
* permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package interfaces
|
package interfaces
|
||||||
|
|
||||||
// ExtendedSequenceNumber represents a two-part sequence number for records aggregated by the Kinesis Producer Library.
|
// ExtendedSequenceNumber represents a two-part sequence number for records aggregated by the Kinesis Producer Library.
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ import (
|
||||||
cwatch "github.com/aws/aws-sdk-go-v2/service/cloudwatch"
|
cwatch "github.com/aws/aws-sdk-go-v2/service/cloudwatch"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/cloudwatch/types"
|
"github.com/aws/aws-sdk-go-v2/service/cloudwatch/types"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultCloudwatchMetricsBufferDuration Buffer metrics for at most this long before publishing to CloudWatch.
|
// DefaultCloudwatchMetricsBufferDuration Buffer metrics for at most this long before publishing to CloudWatch.
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import (
|
||||||
prom "github.com/prometheus/client_golang/prometheus"
|
prom "github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MonitoringService publishes kcl metrics to Prometheus.
|
// MonitoringService publishes kcl metrics to Prometheus.
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ShardStatus struct {
|
type ShardStatus struct {
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,12 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl/clientlibrary/checkpoint"
|
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
kcl "github.com/vmware/vmware-go-kcl/clientlibrary/interfaces"
|
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/metrics"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
par "github.com/vmware/vmware-go-kcl/clientlibrary/partition"
|
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
deagg "github.com/vmware/vmware-go-kcl/internal/deaggregator"
|
deagg "github.com/vmware/vmware-go-kcl-v2/internal/deaggregator"
|
||||||
)
|
)
|
||||||
|
|
||||||
type shardConsumer interface {
|
type shardConsumer interface {
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl/clientlibrary/checkpoint"
|
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
kcl "github.com/vmware/vmware-go-kcl/clientlibrary/interfaces"
|
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FanOutShardConsumer is responsible for consuming data records of a (specified) shard.
|
// FanOutShardConsumer is responsible for consuming data records of a (specified) shard.
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl/clientlibrary/checkpoint"
|
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
kcl "github.com/vmware/vmware-go-kcl/clientlibrary/interfaces"
|
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/metrics"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PollingShardConsumer is responsible for polling data records from a (specified) shard.
|
// PollingShardConsumer is responsible for polling data records from a (specified) shard.
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ package worker
|
||||||
import (
|
import (
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
"github.com/aws/aws-sdk-go-v2/aws"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl/clientlibrary/checkpoint"
|
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
kcl "github.com/vmware/vmware-go-kcl/clientlibrary/interfaces"
|
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
par "github.com/vmware/vmware-go-kcl/clientlibrary/partition"
|
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,11 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/credentials"
|
"github.com/aws/aws-sdk-go-v2/credentials"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl/clientlibrary/checkpoint"
|
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
kcl "github.com/vmware/vmware-go-kcl/clientlibrary/interfaces"
|
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/metrics"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
par "github.com/vmware/vmware-go-kcl/clientlibrary/partition"
|
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
)
|
)
|
||||||
|
|
||||||
//Worker is the high level class that Kinesis applications use to start processing data. It initializes and oversees
|
//Worker is the high level class that Kinesis applications use to start processing data. It initializes and oversees
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
||||||
module github.com/vmware/vmware-go-kcl
|
module github.com/vmware/vmware-go-kcl-v2
|
||||||
|
|
||||||
go 1.17
|
go 1.17
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
rec "github.com/vmware/vmware-go-kcl/internal/records"
|
rec "github.com/vmware/vmware-go-kcl-v2/internal/records"
|
||||||
)
|
)
|
||||||
|
|
||||||
// KplMagicHeader Magic File Header for a KPL Aggregated Record
|
// KplMagicHeader Magic File Header for a KPL Aggregated Record
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
deagg "github.com/vmware/vmware-go-kcl/internal/deaggregator"
|
deagg "github.com/vmware/vmware-go-kcl-v2/internal/deaggregator"
|
||||||
rec "github.com/vmware/vmware-go-kcl/internal/records"
|
rec "github.com/vmware/vmware-go-kcl-v2/internal/records"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Generate an aggregate record in the correct AWS-specified format
|
// Generate an aggregate record in the correct AWS-specified format
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ package zap
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
uzap "go.uber.org/zap"
|
uzap "go.uber.org/zap"
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
lumberjack "gopkg.in/natefinch/lumberjack.v2"
|
lumberjack "gopkg.in/natefinch/lumberjack.v2"
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
"github.com/vmware/vmware-go-kcl/logger/zap"
|
"github.com/vmware/vmware-go-kcl-v2/logger/zap"
|
||||||
uzap "go.uber.org/zap"
|
uzap "go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ package zerolog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
"gopkg.in/natefinch/lumberjack.v2"
|
"gopkg.in/natefinch/lumberjack.v2"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package zerolog
|
package zerolog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl/clientlibrary/checkpoint"
|
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
cfg "github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
cfg "github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
wk "github.com/vmware/vmware-go-kcl/clientlibrary/worker"
|
wk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/worker"
|
||||||
)
|
)
|
||||||
|
|
||||||
type LeaseStealingTest struct {
|
type LeaseStealingTest struct {
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
zaplogger "github.com/vmware/vmware-go-kcl/logger/zap"
|
zaplogger "github.com/vmware/vmware-go-kcl-v2/logger/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestZapLoggerWithConfig(t *testing.T) {
|
func TestZapLoggerWithConfig(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
"github.com/aws/aws-sdk-go-v2/aws"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
kc "github.com/vmware/vmware-go-kcl/clientlibrary/interfaces"
|
kc "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Record processor factory is used to create RecordProcessor
|
// Record processor factory is used to create RecordProcessor
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/utils"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/utils"
|
||||||
rec "github.com/vmware/vmware-go-kcl/internal/records"
|
rec "github.com/vmware/vmware-go-kcl-v2/internal/records"
|
||||||
)
|
)
|
||||||
|
|
||||||
const specstr = `{"name":"kube-qQyhk","networking":{"containerNetworkCidr":"10.2.0.0/16"},"orgName":"BVT-Org-cLQch","projectName":"project-tDSJd","serviceLevel":"DEVELOPER","size":{"count":1},"version":"1.8.1-4"}`
|
const specstr = `{"name":"kube-qQyhk","networking":{"containerNetworkCidr":"10.2.0.0/16"},"orgName":"BVT-Org-cLQch","projectName":"project-tDSJd","serviceLevel":"DEVELOPER","size":{"count":1},"version":"1.8.1-4"}`
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@ import (
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl/clientlibrary/checkpoint"
|
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
cfg "github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
cfg "github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
par "github.com/vmware/vmware-go-kcl/clientlibrary/partition"
|
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
wk "github.com/vmware/vmware-go-kcl/clientlibrary/worker"
|
wk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/worker"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestWorkerInjectCheckpointer(t *testing.T) {
|
func TestWorkerInjectCheckpointer(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@ package test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl/clientlibrary/checkpoint"
|
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
cfg "github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
cfg "github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
wk "github.com/vmware/vmware-go-kcl/clientlibrary/worker"
|
wk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/worker"
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLeaseStealing(t *testing.T) {
|
func TestLeaseStealing(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,13 @@ import (
|
||||||
"github.com/prometheus/common/expfmt"
|
"github.com/prometheus/common/expfmt"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
cfg "github.com/vmware/vmware-go-kcl/clientlibrary/config"
|
cfg "github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/metrics"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/metrics/cloudwatch"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics/cloudwatch"
|
||||||
"github.com/vmware/vmware-go-kcl/clientlibrary/metrics/prometheus"
|
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics/prometheus"
|
||||||
wk "github.com/vmware/vmware-go-kcl/clientlibrary/worker"
|
wk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/worker"
|
||||||
"github.com/vmware/vmware-go-kcl/logger"
|
"github.com/vmware/vmware-go-kcl-v2/logger"
|
||||||
zaplogger "github.com/vmware/vmware-go-kcl/logger/zap"
|
zaplogger "github.com/vmware/vmware-go-kcl-v2/logger/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue