connector

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusConnector

type PrometheusConnector struct {
	// contains filtered or unexported fields
}

PrometheusConnector implements a data connector for Prometheus API

func NewPrometheusConnector

func NewPrometheusConnector() *PrometheusConnector

NewPrometheusConnector creates a Prometheus connector instance

func (*PrometheusConnector) GetCapabilities

GetCapabilities get the connector's capabilities.

func (*PrometheusConnector) GetSchema

GetSchema gets the connector's schema.

func (*PrometheusConnector) HealthCheck

func (c *PrometheusConnector) HealthCheck(ctx context.Context, conf *metadata.Configuration, state *metadata.State) error

HealthCheck checks the health of the connector.

For example, this function should check that the connector is able to reach its data source over the network.

Should throw if the check fails, else resolve.

func (*PrometheusConnector) Mutation

Mutation executes a mutation.

func (*PrometheusConnector) MutationExplain

MutationExplain explains a mutation by creating an execution plan.

func (*PrometheusConnector) ParseConfiguration

func (c *PrometheusConnector) ParseConfiguration(ctx context.Context, configurationDir string) (*metadata.Configuration, error)

ParseConfiguration validates the configuration files provided by the user, returning a validated 'Configuration', or throwing an error to prevents Connector startup.

func (*PrometheusConnector) Query

Query executes a query.

func (*PrometheusConnector) QueryExplain

QueryExplain explains a query by creating an execution plan.

func (*PrometheusConnector) TryInitState

TryInitState initializes the connector's in-memory state.

For example, any connection pools, prepared queries, or other managed resources would be allocated here.

In addition, this function should register any connector-specific metrics with the metrics registry.

Directories

Path Synopsis
Code generated by github.com/hasura/ndc-sdk-go/cmd/hasura-ndc-go, DO NOT EDIT.
Code generated by github.com/hasura/ndc-sdk-go/cmd/hasura-ndc-go, DO NOT EDIT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL