Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fluentbit-plugin-wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
fluentbit-plugin-wendelin
Commits
d2e21ad4
Commit
d2e21ad4
authored
Nov 10, 2022
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Fixup
2b294bb3
parent
2b294bb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
14 deletions
+1
-14
src/fluentbit_wendelin.go
src/fluentbit_wendelin.go
+1
-14
No files found.
src/fluentbit_wendelin.go
View file @
d2e21ad4
...
@@ -4,7 +4,6 @@ import (
...
@@ -4,7 +4,6 @@ import (
"bytes"
"bytes"
"C"
"C"
"fmt"
"fmt"
"time"
"os"
"os"
"unsafe"
"unsafe"
"net/http"
"net/http"
...
@@ -45,7 +44,6 @@ func FLBPluginInit(plugin unsafe.Pointer) int {
...
@@ -45,7 +44,6 @@ func FLBPluginInit(plugin unsafe.Pointer) int {
//export FLBPluginFlushCtx
//export FLBPluginFlushCtx
func
FLBPluginFlushCtx
(
ctx
,
data
unsafe
.
Pointer
,
length
C
.
int
,
tag
*
C
.
char
)
int
{
func
FLBPluginFlushCtx
(
ctx
,
data
unsafe
.
Pointer
,
length
C
.
int
,
tag
*
C
.
char
)
int
{
var
ret
int
var
ret
int
var
ts
interface
{}
var
record
map
[
interface
{}]
interface
{}
var
record
map
[
interface
{}]
interface
{}
// Create Fluent Bit decoder
// Create Fluent Bit decoder
dec
:=
output
.
NewDecoder
(
data
,
int
(
length
))
dec
:=
output
.
NewDecoder
(
data
,
int
(
length
))
...
@@ -56,22 +54,11 @@ func FLBPluginFlushCtx(ctx, data unsafe.Pointer, length C.int, tag *C.char) int
...
@@ -56,22 +54,11 @@ func FLBPluginFlushCtx(ctx, data unsafe.Pointer, length C.int, tag *C.char) int
var
is_end
bool
=
false
var
is_end
bool
=
false
for
{
for
{
// Extract Record
// Extract Record
ret
,
ts
,
record
=
output
.
GetRecord
(
dec
)
ret
,
_
,
record
=
output
.
GetRecord
(
dec
)
if
ret
!=
0
{
if
ret
!=
0
{
break
break
}
}
var
timestamp
time
.
Time
switch
t
:=
ts
.
(
type
)
{
case
output
.
FLBTime
:
timestamp
=
ts
.
(
output
.
FLBTime
)
.
Time
case
uint64
:
timestamp
=
time
.
Unix
(
int64
(
t
),
0
)
default
:
fmt
.
Println
(
"time provided invalid, defaulting to now."
)
timestamp
=
time
.
Now
()
}
// Print record keys and values
// Print record keys and values
for
_
,
v
:=
range
record
{
for
_
,
v
:=
range
record
{
var
output_string
string
=
""
var
output_string
string
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment