Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Latest commit

 

History

History
23 lines (18 loc) · 583 Bytes

CONNECTORS.md

File metadata and controls

23 lines (18 loc) · 583 Bytes

Mastro

Connectors

A Data source is defined in the abstract package as follows:

type ConnectorProvider interface {
	ValidateDataSourceDefinition(*conf.DataSourceDefinition) error
	InitConnection(*conf.DataSourceDefinition)
	CloseConnection()
}

Have a look at the sources/* packages for specific implementations of the interface.

A factory is generally used to instantiate the connector with default settings:

func NewElasticConnector() *Connector {
	return &Connector{}
}

The connector can be then used for any of the implemented DAOs to be started.