GreptimeTeam / greptimedb-ingester-go

A Go ingester for GreptimeDB, which is compatible with GreptimeDB protocol and lightweight.
Apache License 2.0
15 stars 5 forks source link

feat: Create directly without schema predefined #19

Closed yuanbohan closed 10 months ago

yuanbohan commented 10 months ago

What's changed and what's your intention?

Client and StreamClient can Create body directly into GreptimeDB without schema predefined.

    monitors := []monitor{
        {
            ID:          randomId(),
            Host:        "127.0.0.1",
            Memory:      1,
            Cpu:         1.0,
            Temperature: -1,
            Ts:          time1,
            Running:     true,
        },
        {
            ID:          randomId(),
            Host:        "127.0.0.2",
            Memory:      2,
            Cpu:         2.0,
            Temperature: -2,
            Ts:          time2,
            Running:     true,
        },
    }

    resp, err := client.Create(context.Background(), monitors)

Checklist

Refer to a related PR or issue link (optional)

codecov-commenter commented 10 months ago

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (34f2874) 77.62% compared to head (b7eaa45) 76.76%.

Files Patch % Lines
client/client.go 62.50% 2 Missing and 1 partial :warning:
client/stream_client.go 62.50% 2 Missing and 1 partial :warning:
schema/schema.go 0.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #19 +/- ## ========================================== - Coverage 77.62% 76.76% -0.87% ========================================== Files 7 7 Lines 371 383 +12 ========================================== + Hits 288 294 +6 - Misses 63 67 +4 - Partials 20 22 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.