connector

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LokiConnector

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

LokiConnector implements a data connector for Loki API

func NewLokiConnector

func NewLokiConnector() *LokiConnector

NewLokiConnector creates a Loki connector instance

func (*LokiConnector) GetCapabilities

GetCapabilities get the connector's capabilities.

func (*LokiConnector) GetSchema

GetSchema gets the connector's schema.

func (*LokiConnector) HealthCheck

func (c *LokiConnector) 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 (*LokiConnector) Mutation

func (c *LokiConnector) Mutation(ctx context.Context, configuration *metadata.Configuration, state *metadata.State, request *schema.MutationRequest) (*schema.MutationResponse, error)

Mutation executes a mutation.

func (*LokiConnector) MutationExplain

func (c *LokiConnector) MutationExplain(ctx context.Context, conf *metadata.Configuration, state *metadata.State, request *schema.MutationRequest) (*schema.ExplainResponse, error)

MutationExplain explains a mutation by creating an execution plan.

func (*LokiConnector) ParseConfiguration

func (c *LokiConnector) 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 (*LokiConnector) Query

func (c *LokiConnector) Query(ctx context.Context, configuration *metadata.Configuration, state *metadata.State, request *schema.QueryRequest) (schema.QueryResponse, error)

Query executes a query.

func (*LokiConnector) QueryExplain

func (c *LokiConnector) QueryExplain(ctx context.Context, conf *metadata.Configuration, state *metadata.State, request *schema.QueryRequest) (*schema.ExplainResponse, error)

QueryExplain explains a query by creating an execution plan.

func (*LokiConnector) TryInitState

func (c *LokiConnector) TryInitState(ctx context.Context, conf *metadata.Configuration, metrics *connector.TelemetryState) (*metadata.State, error)

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.
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