MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / newExecutor

Function newExecutor

module/monitor/driver/influxdb-v2/executor.go:30–39  ·  view source on GitHub ↗
(cfg string, fluxQuery flux.IFluxQuery)

Source from the content-addressed store, hash-verified

28var _ driver.IRestOverview = (*executor)(nil)
29
30func newExecutor(cfg string, fluxQuery flux.IFluxQuery) (driver.IExecutor, error) {
31 var data InfluxdbV2Config
32 err := json.Unmarshal([]byte(cfg), &data)
33 if err != nil {
34 return nil, err
35 }
36 client := influxdb2.NewClient(data.Addr, data.Token)
37
38 return &executor{cfg: data, openApi: client.QueryAPI(data.Org), client: client, fluxQuery: fluxQuery}, nil
39}
40
41type executor struct {
42 fluxQuery flux.IFluxQuery

Callers 1

CreateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected