Documentation ¶
Index ¶
- type LokiConnector
- func (c *LokiConnector) GetCapabilities(conf *metadata.Configuration) schema.CapabilitiesResponseMarshaler
- func (c *LokiConnector) GetSchema(ctx context.Context, configuration *metadata.Configuration, _ *metadata.State) (schema.SchemaResponseMarshaler, error)
- func (c *LokiConnector) HealthCheck(ctx context.Context, conf *metadata.Configuration, state *metadata.State) error
- func (c *LokiConnector) Mutation(ctx context.Context, configuration *metadata.Configuration, ...) (*schema.MutationResponse, error)
- func (c *LokiConnector) MutationExplain(ctx context.Context, conf *metadata.Configuration, state *metadata.State, ...) (*schema.ExplainResponse, error)
- func (c *LokiConnector) ParseConfiguration(ctx context.Context, configurationDir string) (*metadata.Configuration, error)
- func (c *LokiConnector) Query(ctx context.Context, configuration *metadata.Configuration, ...) (schema.QueryResponse, error)
- func (c *LokiConnector) QueryExplain(ctx context.Context, conf *metadata.Configuration, state *metadata.State, ...) (*schema.ExplainResponse, error)
- func (c *LokiConnector) TryInitState(ctx context.Context, conf *metadata.Configuration, ...) (*metadata.State, error)
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 ¶
func (c *LokiConnector) GetCapabilities(conf *metadata.Configuration) schema.CapabilitiesResponseMarshaler
GetCapabilities get the connector's capabilities.
func (*LokiConnector) GetSchema ¶
func (c *LokiConnector) GetSchema(ctx context.Context, configuration *metadata.Configuration, _ *metadata.State) (schema.SchemaResponseMarshaler, error)
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. |