GreptimeTeam/greptimedb-ingester-go

support different struct in WriteObject

Open

#25 aberto em 27 de fev. de 2024

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Go (7 forks)auto 404
good first issue

Métricas do repositório

Stars
 (16 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

for now, ingester-go only support one type in Client.WriteObject, but it should behave like ingester-java, like:

resp, err := client.WriteObject(context.Background(), cup1, mem1, cup2, mem2)

Function signature

from

func (c *Client) WriteObject(ctx context.Context, obj any) (*gpb.GreptimeResponse, error) 

to

func (c *Client) WriteObject(ctx context.Context, objs ...any) (*gpb.GreptimeResponse, error) 

NOTE

  • To simplify the maintenance, WriteObject use variadic parameters

Guia do colaborador