Skip to content

Commit

Permalink
Merge pull request #49 from sysflow-telemetry/go1.19-sigma
Browse files Browse the repository at this point in the history
Go1.19 sigma
  • Loading branch information
araujof authored Sep 6, 2023
2 parents 89bc902 + f504d18 commit 3d54fd4
Show file tree
Hide file tree
Showing 141 changed files with 4,270 additions and 1,201 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- name: Lint core module
uses: golangci/golangci-lint-action@v3
with:
version: v1.47.1
version: v1.51.1
working-directory: core
args: --disable=errcheck
args: --disable=errcheck --build-tags=flatrecord
lint-driver:
needs: lint-core
runs-on: ubuntu-latest
Expand All @@ -51,11 +51,11 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- name: Lint driver module
uses: golangci/golangci-lint-action@v3
with:
version: v1.47.1
version: v1.51.1
working-directory: driver
args: --disable=errcheck
docker:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2021 IBM Corporation.
# Copyright (C) 2022 IBM Corporation.
#
# Authors:
# Frederico Araujo <[email protected]>
Expand Down Expand Up @@ -38,8 +38,8 @@ ENV SRC_ROOT=/go/src/github.com/sysflow-telemetry/sf-processor/
RUN dnf update -y --disableplugin=subscription-manager && \
dnf install -y --disableplugin=subscription-manager wget gcc make git device-mapper-devel

RUN wget https://go.dev/dl/go1.17.7.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.17.7.linux-amd64.tar.gz && mkdir -p $SRC_ROOT
RUN wget https://go.dev/dl/go1.19.4.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.19.4.linux-amd64.tar.gz && mkdir -p $SRC_ROOT

# Copy sources
COPY core ${SRC_ROOT}core
Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ include ./makefile.manifest.inc
# Basic go commands
PATH=$(shell printenv PATH):/usr/local/go/bin
GOCMD=go
GOBUILD=$(GOCMD) build -trimpath -tags exclude_graphdriver_btrfs
GOBUILD=$(GOCMD) build -trimpath -tags "exclude_graphdriver_btrfs flatrecord"
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test -tags exclude_graphdriver_btrfs
GOGET=$(GOCMD) get -tags exclude_graphdriver_btrfs
GOTEST=$(GOCMD) test -tags "exclude_graphdriver_btrfs flatrecord"
GOGET=$(GOCMD) get -tags "exclude_graphdriver_btrfs flatrecord"
BIN=sfprocessor
OUTPUT=$(BIN)
SRC=./driver
Expand Down Expand Up @@ -80,3 +80,11 @@ pull:
up:
sudo docker-compose -f docker-compose.yml up

.PHONY: plugins
plugins:
@for dir in `find plugins -type d`; do \
if [ -f $${dir}/Makefile ]; then \
$(MAKE) -C $${dir}; \
fi; \
done

179 changes: 90 additions & 89 deletions core/exporter/encoders/ecs.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/exporter/encoders/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ package encoders

import (
"github.com/sysflow-telemetry/sf-processor/core/exporter/commons"
"github.com/sysflow-telemetry/sf-processor/core/policyengine/engine"
"github.com/sysflow-telemetry/sf-processor/core/policyengine/source/flatrecord"
)

// Encoder converts and serializes a record into export data.
type Encoder interface {
Register(codecs map[commons.Format]EncoderFactory)
Encode(recs []*engine.Record) ([]commons.EncodedData, error)
Encode(recs []*flatrecord.Record) ([]commons.EncodedData, error)
Cleanup()
}

Expand Down
Loading

0 comments on commit 3d54fd4

Please sign in to comment.