Revert "Revert "changed mod file path to my clone repo""
This reverts commit aa0a11286d.
This commit is contained in:
parent
d51f7a4d17
commit
66f1821f1b
27 changed files with 76 additions and 77 deletions
10
README.md
10
README.md
|
|
@ -1,9 +1,9 @@
|
||||||
# VMWare Go KCL v2
|
# VMWare Go KCL v2
|
||||||
|
|
||||||

|

|
||||||
[](https://goreportcard.com/report/github.com/vmware/vmware-go-kcl-v2)
|
[](https://goreportcard.com/report/github.com/magiusdarrigo/vmware-go-kcl-v2)
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://github.com/vmware/vmware-go-kcl-v2/actions/workflows/vmware-go-kcl-v2-ci.yml)
|
[](https://github.com/magiusdarrigo/vmware-go-kcl-v2/actions/workflows/vmware-go-kcl-v2-ci.yml)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
|
@ -11,12 +11,12 @@ VMware-Go-KCL-V2 is a native open-source Go library for Amazon Kinesis Data Stre
|
||||||
to program KDS consumers in lightweight Go language and still take advantage of the features presented by the native
|
to program KDS consumers in lightweight Go language and still take advantage of the features presented by the native
|
||||||
KDS Java API libraries.
|
KDS Java API libraries.
|
||||||
|
|
||||||
[vmware-go-kcl-v2](https://github.com/vmware/vmware-go-kcl-v2) is a VMWare originated open-source project for AWS Kinesis
|
[vmware-go-kcl-v2](https://github.com/magiusdarrigo/vmware-go-kcl-v2) 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
|
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,
|
has contributed to the vmware-go-kcl codebase and heavily used it in the product. Besides,
|
||||||
[vmware-go-kcl-v2](https://github.com/vmware/vmware-go-kcl-v2) has got
|
[vmware-go-kcl-v2](https://github.com/magiusdarrigo/vmware-go-kcl-v2) has got
|
||||||
[recognition](https://www.linkedin.com/posts/adityakrish_vmware-go-kcl-a-native-open-source-go-programming-activity-6810626798133616640-B6W8/),
|
[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-v2/graphs/contributors) from the industry.
|
and [contributions](https://github.com/magiusdarrigo/vmware-go-kcl-v2/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).
|
`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).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// Package checkpoint
|
// Package checkpoint
|
||||||
// The implementation is derived from https://github.com/patrobinson/gokini
|
// The implementation is derived from https://github.com/patrobinson/gokini
|
||||||
//
|
//
|
||||||
// Copyright 2018 Patrick robinson
|
// # Copyright 2018 Patrick robinson
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
|
|
@ -33,7 +33,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
par "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// Package checkpoint
|
// Package checkpoint
|
||||||
// The implementation is derived from https://github.com/patrobinson/gokini
|
// The implementation is derived from https://github.com/patrobinson/gokini
|
||||||
//
|
//
|
||||||
// Copyright 2018 Patrick robinson
|
// # Copyright 2018 Patrick robinson
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
|
|
@ -41,9 +41,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-v2/clientlibrary/config"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
par "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/logger"
|
"github.com/magiusdarrigo/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-v2/clientlibrary/config"
|
cfg "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
par "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDoesTableExist(t *testing.T) {
|
func TestDoesTableExist(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
"github.com/aws/aws-sdk-go-v2/aws"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/logger"
|
"github.com/magiusdarrigo/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-v2/logger"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestConfig(t *testing.T) {
|
func TestConfig(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,9 @@ import (
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
"github.com/aws/aws-sdk-go-v2/aws"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/utils"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/utils"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/logger"
|
"github.com/magiusdarrigo/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.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// Package cloudwatch
|
// Package cloudwatch
|
||||||
// The implementation is derived from https://github.com/patrobinson/gokini
|
// The implementation is derived from https://github.com/patrobinson/gokini
|
||||||
//
|
//
|
||||||
// Copyright 2018 Patrick robinson
|
// # Copyright 2018 Patrick robinson
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
|
|
@ -38,7 +38,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-v2/logger"
|
"github.com/magiusdarrigo/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.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// Package prometheus
|
// Package prometheus
|
||||||
// The implementation is derived from https://github.com/patrobinson/gokini
|
// The implementation is derived from https://github.com/patrobinson/gokini
|
||||||
//
|
//
|
||||||
// Copyright 2018 Patrick robinson
|
// # Copyright 2018 Patrick robinson
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
|
|
@ -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-v2/logger"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MonitoringService publishes kcl metrics to Prometheus.
|
// MonitoringService publishes kcl metrics to Prometheus.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// Package partition
|
// Package partition
|
||||||
// The implementation is derived from https://github.com/patrobinson/gokini
|
// The implementation is derived from https://github.com/patrobinson/gokini
|
||||||
//
|
//
|
||||||
// Copyright 2018 Patrick robinson
|
// # Copyright 2018 Patrick robinson
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
|
|
@ -33,7 +33,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ShardStatus struct {
|
type ShardStatus struct {
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,11 @@ import (
|
||||||
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
|
||||||
deagg "github.com/awslabs/kinesis-aggregation/go/v2/deaggregator"
|
deagg "github.com/awslabs/kinesis-aggregation/go/v2/deaggregator"
|
||||||
|
|
||||||
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
chk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
kcl "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
par "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
)
|
)
|
||||||
|
|
||||||
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-v2/clientlibrary/checkpoint"
|
chk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
kcl "github.com/magiusdarrigo/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.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// Package worker
|
// Package worker
|
||||||
// The implementation is derived from https://github.com/patrobinson/gokini
|
// The implementation is derived from https://github.com/patrobinson/gokini
|
||||||
//
|
//
|
||||||
// Copyright 2018 Patrick robinson
|
// # Copyright 2018 Patrick robinson
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
|
|
@ -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-v2/clientlibrary/checkpoint"
|
chk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
kcl "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
"github.com/magiusdarrigo/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-v2/clientlibrary/checkpoint"
|
chk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
kcl "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
par "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// Package worker
|
// Package worker
|
||||||
// The implementation is derived from https://github.com/patrobinson/gokini
|
// The implementation is derived from https://github.com/patrobinson/gokini
|
||||||
//
|
//
|
||||||
// Copyright 2018 Patrick robinson
|
// # Copyright 2018 Patrick robinson
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
|
|
@ -42,16 +42,16 @@ import (
|
||||||
awsConfig "github.com/aws/aws-sdk-go-v2/config"
|
awsConfig "github.com/aws/aws-sdk-go-v2/config"
|
||||||
"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-v2/clientlibrary/checkpoint"
|
chk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
kcl "github.com/vmware/vmware-go-kcl-v2/clientlibrary/interfaces"
|
kcl "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
par "github.com/magiusdarrigo/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
|
||||||
//different components (e.g. syncing shard and lease information, tracking shard assignments, and processing data from
|
// different components (e.g. syncing shard and lease information, tracking shard assignments, and processing data from
|
||||||
//the shards).
|
// the shards).
|
||||||
type Worker struct {
|
type Worker struct {
|
||||||
streamName string
|
streamName string
|
||||||
regionName string
|
regionName string
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
||||||
module github.com/vmware/vmware-go-kcl-v2
|
module github.com/magiusdarrigo/vmware-go-kcl-v2
|
||||||
|
|
||||||
go 1.17
|
go 1.17
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ package zap
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl-v2/logger"
|
"github.com/magiusdarrigo/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"
|
||||||
|
|
@ -44,7 +44,6 @@ type ZapLogger struct {
|
||||||
//
|
//
|
||||||
// Base zap logger can be convert to SugaredLogger by calling to add a wrapper:
|
// Base zap logger can be convert to SugaredLogger by calling to add a wrapper:
|
||||||
// sugaredLogger := log.Sugar()
|
// sugaredLogger := log.Sugar()
|
||||||
//
|
|
||||||
func NewZapLogger(logger *uzap.SugaredLogger) logger.Logger {
|
func NewZapLogger(logger *uzap.SugaredLogger) logger.Logger {
|
||||||
return &ZapLogger{
|
return &ZapLogger{
|
||||||
sugaredLogger: logger,
|
sugaredLogger: logger,
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ package zap_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/logger"
|
||||||
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/logger/zap"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/logger"
|
|
||||||
"github.com/vmware/vmware-go-kcl-v2/logger/zap"
|
|
||||||
uzap "go.uber.org/zap"
|
uzap "go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@
|
||||||
package zerolog
|
package zerolog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/logger"
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"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-v2/logger"
|
"github.com/magiusdarrigo/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-v2/clientlibrary/checkpoint"
|
chk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
cfg "github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
cfg "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
wk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/worker"
|
wk "github.com/magiusdarrigo/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-v2/logger"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/logger"
|
||||||
zaplogger "github.com/vmware/vmware-go-kcl-v2/logger/zap"
|
zaplogger "github.com/magiusdarrigo/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-v2/clientlibrary/interfaces"
|
kc "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/interfaces"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Record processor factory is used to create RecordProcessor
|
// Record processor factory is used to create RecordProcessor
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import (
|
||||||
rec "github.com/awslabs/kinesis-aggregation/go/v2/records"
|
rec "github.com/awslabs/kinesis-aggregation/go/v2/records"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/utils"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
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"}`
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ package test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
chk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -31,9 +31,9 @@ import (
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
cfg "github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
cfg "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
par "github.com/vmware/vmware-go-kcl-v2/clientlibrary/partition"
|
par "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/partition"
|
||||||
wk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/worker"
|
wk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/worker"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestWorkerInjectCheckpointer(t *testing.T) {
|
func TestWorkerInjectCheckpointer(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
package test
|
package test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
chk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
chk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/checkpoint"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
cfg "github.com/vmware/vmware-go-kcl-v2/clientlibrary/config"
|
cfg "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
wk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/worker"
|
wk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/worker"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/logger"
|
"github.com/magiusdarrigo/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-v2/clientlibrary/config"
|
cfg "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/config"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/metrics"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics/cloudwatch"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/metrics/cloudwatch"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/clientlibrary/metrics/prometheus"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/metrics/prometheus"
|
||||||
wk "github.com/vmware/vmware-go-kcl-v2/clientlibrary/worker"
|
wk "github.com/magiusdarrigo/vmware-go-kcl-v2/clientlibrary/worker"
|
||||||
"github.com/vmware/vmware-go-kcl-v2/logger"
|
"github.com/magiusdarrigo/vmware-go-kcl-v2/logger"
|
||||||
zaplogger "github.com/vmware/vmware-go-kcl-v2/logger/zap"
|
zaplogger "github.com/magiusdarrigo/vmware-go-kcl-v2/logger/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue