Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move filebeat/reader to libbeat/reader #8206

Merged
merged 3 commits into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-developer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ The list below covers the major changes between 6.3.0 and master only.
`mage -h goTestUnit`. {pull}7766[7766]
- Beats packaging now build non-oss binaries from code located in the x-pack folder. {issue}7783[7783]
- New function `AddTagsWithKey` is added, so `common.MapStr` can be enriched with tags with an arbitrary key. {pull}7991[7991]
- Move filebeat/reader to libbeat/reader {pull}8206[8206]
4 changes: 2 additions & 2 deletions filebeat/input/log/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
cfg "github.com/elastic/beats/filebeat/config"
"github.com/elastic/beats/filebeat/harvester"
"github.com/elastic/beats/filebeat/input/file"
"github.com/elastic/beats/filebeat/reader/multiline"
"github.com/elastic/beats/filebeat/reader/readjson"
"github.com/elastic/beats/libbeat/common/cfgwarn"
"github.com/elastic/beats/libbeat/common/match"
"github.com/elastic/beats/libbeat/logp"
"github.com/elastic/beats/libbeat/reader/multiline"
"github.com/elastic/beats/libbeat/reader/readjson"
)

var (
Expand Down
10 changes: 5 additions & 5 deletions filebeat/input/log/harvester.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ import (
"github.com/elastic/beats/filebeat/channel"
"github.com/elastic/beats/filebeat/harvester"
"github.com/elastic/beats/filebeat/input/file"
"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/filebeat/reader/multiline"
"github.com/elastic/beats/filebeat/reader/readfile"
"github.com/elastic/beats/filebeat/reader/readfile/encoding"
"github.com/elastic/beats/filebeat/reader/readjson"
"github.com/elastic/beats/filebeat/util"
"github.com/elastic/beats/libbeat/reader"
"github.com/elastic/beats/libbeat/reader/multiline"
"github.com/elastic/beats/libbeat/reader/readfile"
"github.com/elastic/beats/libbeat/reader/readfile/encoding"
"github.com/elastic/beats/libbeat/reader/readjson"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions filebeat/input/log/harvester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (

"github.com/stretchr/testify/assert"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/filebeat/reader/readfile/encoding"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/reader"
"github.com/elastic/beats/libbeat/reader/readfile/encoding"
)

func TestReadLine(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions filebeat/scripts/tester/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (
"strings"
"time"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/filebeat/reader/multiline"
"github.com/elastic/beats/filebeat/reader/readfile"
"github.com/elastic/beats/filebeat/reader/readfile/encoding"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/common/match"
"github.com/elastic/beats/libbeat/reader"
"github.com/elastic/beats/libbeat/reader/multiline"
"github.com/elastic/beats/libbeat/reader/readfile"
"github.com/elastic/beats/libbeat/reader/readfile/encoding"
)

type logReaderConfig struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"fmt"
"time"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/filebeat/reader/readfile"
"github.com/elastic/beats/libbeat/common/match"
"github.com/elastic/beats/libbeat/logp"
"github.com/elastic/beats/libbeat/reader"
"github.com/elastic/beats/libbeat/reader/readfile"
)

// MultiLine reader combining multiple line events into one multi-line event.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (

"github.com/stretchr/testify/assert"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/filebeat/reader/readfile"
"github.com/elastic/beats/filebeat/reader/readfile/encoding"
"github.com/elastic/beats/libbeat/common/match"
"github.com/elastic/beats/libbeat/reader"
"github.com/elastic/beats/libbeat/reader/readfile"
"github.com/elastic/beats/libbeat/reader/readfile/encoding"
)

type bufferSource struct{ buf *bytes.Buffer }
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"io"
"time"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/filebeat/reader/readfile/encoding"
"github.com/elastic/beats/libbeat/reader"
"github.com/elastic/beats/libbeat/reader/readfile/encoding"
)

// Reader produces lines by reading lines from an io.Reader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package readfile

import (
"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/libbeat/reader"
)

// Reader sets an upper limited on line length. Lines longer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/libbeat/reader"
)

type mockReader struct {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/stretchr/testify/assert"
"golang.org/x/text/transform"

"github.com/elastic/beats/filebeat/reader/readfile/encoding"
"github.com/elastic/beats/libbeat/reader/readfile/encoding"
)

// Sample texts are from http://www.columbia.edu/~kermit/utf8.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package readfile

import (
"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/libbeat/reader"
)

// StripNewline reader removes the last trailing newline characters from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"time"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/libbeat/reader"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"strings"
"time"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/reader"

"github.com/pkg/errors"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"testing"
"time"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/reader"

"github.com/stretchr/testify/assert"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"fmt"
"time"

"github.com/elastic/beats/filebeat/reader"
"github.com/elastic/beats/libbeat/beat"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/common/jsontransform"
"github.com/elastic/beats/libbeat/logp"
"github.com/elastic/beats/libbeat/reader"
)

// JSONReader parses JSON inputs
Expand Down