Skip to content

Commit

Permalink
v2
Browse files Browse the repository at this point in the history
  • Loading branch information
lspgn committed Apr 16, 2023
1 parent f930309 commit 1cdfc02
Show file tree
Hide file tree
Showing 24 changed files with 67 additions and 67 deletions.
16 changes: 8 additions & 8 deletions cmd/enricher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import (
"os"
"strings"

flowmessage "github.com/netsampler/goflow2/cmd/enricher/pb"
flowmessage "github.com/netsampler/goflow2/v2/cmd/enricher/pb"

// import various formatters
"github.com/netsampler/goflow2/format"
_ "github.com/netsampler/goflow2/format/binary"
_ "github.com/netsampler/goflow2/format/json"
_ "github.com/netsampler/goflow2/format/text"
"github.com/netsampler/goflow2/v2/format"
_ "github.com/netsampler/goflow2/v2/format/binary"
_ "github.com/netsampler/goflow2/v2/format/json"
_ "github.com/netsampler/goflow2/v2/format/text"

// import various transports
"github.com/netsampler/goflow2/transport"
_ "github.com/netsampler/goflow2/transport/file"
_ "github.com/netsampler/goflow2/transport/kafka"
"github.com/netsampler/goflow2/v2/transport"
_ "github.com/netsampler/goflow2/v2/transport/file"
_ "github.com/netsampler/goflow2/v2/transport/kafka"

"github.com/oschwald/geoip2-golang"
log "github.com/sirupsen/logrus"
Expand Down
26 changes: 13 additions & 13 deletions cmd/goflow2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ import (
"time"

// decoders
"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/netflow"

// various formatters
"github.com/netsampler/goflow2/format"
_ "github.com/netsampler/goflow2/format/binary"
_ "github.com/netsampler/goflow2/format/json"
_ "github.com/netsampler/goflow2/format/text"
"github.com/netsampler/goflow2/v2/format"
_ "github.com/netsampler/goflow2/v2/format/binary"
_ "github.com/netsampler/goflow2/v2/format/json"
_ "github.com/netsampler/goflow2/v2/format/text"

// various transports
"github.com/netsampler/goflow2/transport"
_ "github.com/netsampler/goflow2/transport/file"
_ "github.com/netsampler/goflow2/transport/kafka"
"github.com/netsampler/goflow2/v2/transport"
_ "github.com/netsampler/goflow2/v2/transport/file"
_ "github.com/netsampler/goflow2/v2/transport/kafka"

// various producers
"github.com/netsampler/goflow2/producer"
protoproducer "github.com/netsampler/goflow2/producer/proto"
rawproducer "github.com/netsampler/goflow2/producer/raw"
"github.com/netsampler/goflow2/v2/producer"
protoproducer "github.com/netsampler/goflow2/v2/producer/proto"
rawproducer "github.com/netsampler/goflow2/v2/producer/raw"

// core libraries
"github.com/netsampler/goflow2/metrics"
"github.com/netsampler/goflow2/utils"
"github.com/netsampler/goflow2/v2/metrics"
"github.com/netsampler/goflow2/v2/utils"

"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion decoders/netflow/netflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"sync"

"github.com/netsampler/goflow2/decoders/utils"
"github.com/netsampler/goflow2/v2/decoders/utils"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion decoders/netflowlegacy/netflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"fmt"

"github.com/netsampler/goflow2/decoders/utils"
"github.com/netsampler/goflow2/v2/decoders/utils"
)

type DecoderError struct {
Expand Down
2 changes: 1 addition & 1 deletion decoders/sflow/sflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"fmt"

"github.com/netsampler/goflow2/decoders/utils"
"github.com/netsampler/goflow2/v2/decoders/utils"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion format/binary/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package binary
import (
"encoding"

"github.com/netsampler/goflow2/format"
"github.com/netsampler/goflow2/v2/format"
)

type BinaryDriver struct {
Expand Down
2 changes: 1 addition & 1 deletion format/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package json
import (
"encoding/json"

"github.com/netsampler/goflow2/format"
"github.com/netsampler/goflow2/v2/format"
)

type JsonDriver struct {
Expand Down
2 changes: 1 addition & 1 deletion format/text/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package text
import (
"encoding"

"github.com/netsampler/goflow2/format"
"github.com/netsampler/goflow2/v2/format"
)

type TextDriver struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/netsampler/goflow2
module github.com/netsampler/goflow2/v2

go 1.20

Expand Down
4 changes: 2 additions & 2 deletions metrics/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"time"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/utils"
"github.com/netsampler/goflow2/v2/decoders/netflow"
"github.com/netsampler/goflow2/v2/utils"

"github.com/prometheus/client_golang/prometheus"
)
Expand Down
10 changes: 5 additions & 5 deletions metrics/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package metrics
import (
"net/netip"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/decoders/netflowlegacy"
"github.com/netsampler/goflow2/decoders/sflow"
flowmessage "github.com/netsampler/goflow2/pb"
"github.com/netsampler/goflow2/producer"
"github.com/netsampler/goflow2/v2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/netflowlegacy"
"github.com/netsampler/goflow2/v2/decoders/sflow"
flowmessage "github.com/netsampler/goflow2/v2/pb"
"github.com/netsampler/goflow2/v2/producer"

"github.com/prometheus/client_golang/prometheus"
)
Expand Down
2 changes: 1 addition & 1 deletion metrics/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package metrics
import (
"strconv"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/netflow"

"github.com/prometheus/client_golang/prometheus"
)
Expand Down
2 changes: 1 addition & 1 deletion producer/proto/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"reflect"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/netflow"
)

type NetFlowMapField struct {
Expand Down
2 changes: 1 addition & 1 deletion producer/proto/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"google.golang.org/protobuf/encoding/protodelim"
"google.golang.org/protobuf/encoding/protowire"

flowmessage "github.com/netsampler/goflow2/pb"
flowmessage "github.com/netsampler/goflow2/v2/pb"
)

type ProtoProducerMessage struct {
Expand Down
6 changes: 3 additions & 3 deletions producer/proto/producer_nf.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"sync"
"time"

"github.com/netsampler/goflow2/decoders/netflow"
flowmessage "github.com/netsampler/goflow2/pb"
"github.com/netsampler/goflow2/producer"
"github.com/netsampler/goflow2/v2/decoders/netflow"
flowmessage "github.com/netsampler/goflow2/v2/pb"
"github.com/netsampler/goflow2/v2/producer"
)

type SamplingRateSystem interface {
Expand Down
6 changes: 3 additions & 3 deletions producer/proto/producer_nflegacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package protoproducer
import (
"encoding/binary"

"github.com/netsampler/goflow2/decoders/netflowlegacy"
flowmessage "github.com/netsampler/goflow2/pb"
"github.com/netsampler/goflow2/producer"
"github.com/netsampler/goflow2/v2/decoders/netflowlegacy"
flowmessage "github.com/netsampler/goflow2/v2/pb"
"github.com/netsampler/goflow2/v2/producer"
)

func ConvertNetFlowLegacyRecord(flowMessage *ProtoProducerMessage, baseTime uint64, uptime uint32, record netflowlegacy.RecordsNetFlowV5) {
Expand Down
6 changes: 3 additions & 3 deletions producer/proto/producer_sf.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package protoproducer
import (
"encoding/binary"

"github.com/netsampler/goflow2/decoders/sflow"
flowmessage "github.com/netsampler/goflow2/pb"
"github.com/netsampler/goflow2/producer"
"github.com/netsampler/goflow2/v2/decoders/sflow"
flowmessage "github.com/netsampler/goflow2/v2/pb"
"github.com/netsampler/goflow2/v2/producer"
)

func GetSFlowFlowSamples(packet *sflow.Packet) []interface{} {
Expand Down
4 changes: 2 additions & 2 deletions producer/proto/producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package protoproducer
import (
"testing"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/decoders/sflow"
"github.com/netsampler/goflow2/v2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/sflow"
"github.com/stretchr/testify/assert"
)

Expand Down
8 changes: 4 additions & 4 deletions producer/proto/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"sync"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/decoders/netflowlegacy"
"github.com/netsampler/goflow2/decoders/sflow"
"github.com/netsampler/goflow2/producer"
"github.com/netsampler/goflow2/v2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/netflowlegacy"
"github.com/netsampler/goflow2/v2/decoders/sflow"
"github.com/netsampler/goflow2/v2/producer"
)

type ProtoProducer struct {
Expand Down
2 changes: 1 addition & 1 deletion producer/proto/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"google.golang.org/protobuf/encoding/protowire"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/netflow"
)

type EndianType string
Expand Down
8 changes: 4 additions & 4 deletions producer/raw/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"net/netip"
"time"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/decoders/netflowlegacy"
"github.com/netsampler/goflow2/decoders/sflow"
"github.com/netsampler/goflow2/producer"
"github.com/netsampler/goflow2/v2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/netflowlegacy"
"github.com/netsampler/goflow2/v2/decoders/sflow"
"github.com/netsampler/goflow2/v2/producer"
)

// Producer that keeps the same format
Expand Down
2 changes: 1 addition & 1 deletion transport/file/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package file
import (
"flag"
"fmt"
"github.com/netsampler/goflow2/transport"
"github.com/netsampler/goflow2/v2/transport"
"io"
"os"
"os/signal"
Expand Down
2 changes: 1 addition & 1 deletion transport/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"
"time"

"github.com/netsampler/goflow2/transport"
"github.com/netsampler/goflow2/v2/transport"

sarama "github.com/Shopify/sarama"
)
Expand Down
14 changes: 7 additions & 7 deletions utils/pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"fmt"
"sync"

"github.com/netsampler/goflow2/decoders/netflow"
"github.com/netsampler/goflow2/decoders/netflowlegacy"
"github.com/netsampler/goflow2/decoders/sflow"
"github.com/netsampler/goflow2/decoders/utils"
"github.com/netsampler/goflow2/format"
"github.com/netsampler/goflow2/producer"
"github.com/netsampler/goflow2/transport"
"github.com/netsampler/goflow2/v2/decoders/netflow"
"github.com/netsampler/goflow2/v2/decoders/netflowlegacy"
"github.com/netsampler/goflow2/v2/decoders/sflow"
"github.com/netsampler/goflow2/v2/decoders/utils"
"github.com/netsampler/goflow2/v2/format"
"github.com/netsampler/goflow2/v2/producer"
"github.com/netsampler/goflow2/v2/transport"
)

type FlowPipe interface {
Expand Down

0 comments on commit 1cdfc02

Please sign in to comment.