Documentation
¶
Index ¶
- Variables
- type Args
- type Argset
- func (a *Argset) ArgCount(query string) int
- func (a *Argset) ConfigSurvey(config Config, machineName string) error
- func (a *Argset) Configure(config Config) error
- func (a *Argset) Done() error
- func (a *Argset) ExpectedOut() (bool, int, error)
- func (a *Argset) GetArgs() []string
- func (a *Argset) HasCountQuery() bool
- func (a *Argset) HasInQuery() bool
- func (a *Argset) HasOutQuery() bool
- func (a *Argset) In(query string, args []string, record Record) error
- func (a *Argset) Init()
- func (a *Argset) Out(query string, args []string) (<-chan Record, error)
- type CSV
- func (c *CSV) ArgCount(query string) int
- func (c *CSV) ConfigSurvey(config Config, machineName string) error
- func (c *CSV) Configure(config Config) error
- func (c *CSV) Done() error
- func (c *CSV) ExpectedOut() (bool, int, error)
- func (c *CSV) HasCountQuery() bool
- func (c *CSV) HasInQuery() bool
- func (c *CSV) HasOutQuery() bool
- func (c *CSV) In(query string, args []string, record Record) error
- func (c *CSV) Init()
- func (c *CSV) Out(query string, args []string) (<-chan Record, error)
- type Cassandra
- func (c *Cassandra) ArgCount(query string) int
- func (c *Cassandra) ConfigSurvey(config Config, machineName string) error
- func (c *Cassandra) Configure(config Config) error
- func (c *Cassandra) Done() error
- func (c *Cassandra) ExpectedOut() (bool, int, error)
- func (c *Cassandra) HasCountQuery() bool
- func (c *Cassandra) HasInQuery() bool
- func (c *Cassandra) HasOutQuery() bool
- func (c *Cassandra) In(query string, args []string, record Record) error
- func (c *Cassandra) Init()
- func (c *Cassandra) Out(query string, args []string) (<-chan Record, error)
- type Collector
- func (c *Collector) ArgCount(query string) int
- func (c *Collector) ConfigSurvey(config Config, machineName string) error
- func (c *Collector) Configure(config Config) error
- func (c *Collector) Done() error
- func (c *Collector) ExpectedOut() (bool, int, error)
- func (c *Collector) GetCollection() []ResultCollectionItem
- func (c *Collector) HasCountQuery() bool
- func (c *Collector) HasInQuery() bool
- func (c *Collector) HasOutQuery() bool
- func (c *Collector) In(query string, args []string, record Record) error
- func (c *Collector) Init()
- func (c *Collector) Out(query string, args []string) (<-chan Record, error)
- type Config
- type DataMap
- type Debug
- func (d *Debug) ArgCount(query string) int
- func (d *Debug) ConfigSurvey(config Config, machineName string) error
- func (d *Debug) Configure(config Config) error
- func (d *Debug) Done() error
- func (d *Debug) ExpectedOut() (bool, int, error)
- func (d *Debug) HasCountQuery() bool
- func (d *Debug) HasInQuery() bool
- func (d *Debug) HasOutQuery() bool
- func (d *Debug) In(query string, args []string, record Record) error
- func (d *Debug) Init()
- func (d *Debug) Out(query string, args []string) (<-chan Record, error)
- type Driver
- type Manager
- type MySql
- func (m *MySql) ArgCount(query string) int
- func (m *MySql) ConfigSurvey(config Config, machineName string) error
- func (m *MySql) Configure(config Config) error
- func (m *MySql) Done() error
- func (m *MySql) ExpectedOut() (bool, int, error)
- func (m *MySql) HasCountQuery() bool
- func (m *MySql) HasInQuery() bool
- func (m *MySql) HasOutQuery() bool
- func (m *MySql) In(query string, args []string, record Record) error
- func (m *MySql) Init()
- func (m *MySql) Out(query string, args []string) (<-chan Record, error)
- type Record
- type ResultCollection
- type ResultCollectionItem
Constants ¶
This section is empty.
Variables ¶
var CollectorStore = map[string]ResultCollection{}
CollectorStore holds a map of ResultCollection
var ConsistencyLookup = map[gocql.Consistency]string{ gocql.Any: `Any`, gocql.One: `One`, gocql.LocalOne: `LocalOne`, gocql.LocalQuorum: `LocalQuorum`, gocql.Quorum: `Quorum`, gocql.All: `All`, }
ConsistencyLookup is a map of Cassandra consistency types. see https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlClientRequestsReadExp.html?hl=consistency
var DriverManager = NewManager()
DriverManager is where drivers register.
Functions ¶
This section is empty.
Types ¶
type Argset ¶ added in v0.0.8
type Argset struct {
// contains filtered or unexported fields
}
Argset implements data.Driver
func (*Argset) ArgCount ¶ added in v0.0.8
ArgCount calculate the number of expected arguments for a specified query with this driver.
func (*Argset) ConfigSurvey ¶ added in v0.0.8
ConfigSurvey is an implementation of Driver
func (*Argset) ExpectedOut ¶ added in v0.0.8
ExpectedOut returns true and the number of expected outbound records, false value mean indefinite.
type CSV ¶
type CSV struct {
// contains filtered or unexported fields
}
CSV implements data.Driver
func (*CSV) ArgCount ¶ added in v0.0.8
ArgCount calculate the number of expected arguments for a specified query with this driver.
func (*CSV) ConfigSurvey ¶
ConfigSurvey is an implementation of Driver
func (*CSV) ExpectedOut ¶
ExpectedOut returns true and the number of expected outbound records, false value mean indefinite. TODO: Implement expected out for CSV
func (*CSV) HasCountQuery ¶
HasCountQuery is false for CSV TODO: implement counter
type Cassandra ¶
type Cassandra struct {
// contains filtered or unexported fields
}
Cassandra implements data.Driver
func (*Cassandra) ArgCount ¶ added in v0.0.8
ArgCount calculate the number of expected arguments for a specified query with this driver.
func (*Cassandra) ConfigSurvey ¶
ConfigSurvey is an implementation of Driver
func (*Cassandra) ExpectedOut ¶
ExpectedOut returns true and the number of expected outbound records, false value mean indefinite.
func (*Cassandra) HasCountQuery ¶
HasCountQuery is true for Cassandra
func (*Cassandra) HasInQuery ¶
HasInQuery is true for Cassandra
func (*Cassandra) HasOutQuery ¶
HasOutQuery is true for Cassandra
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector implements data.Driver TODO: implement a generate persistent kv object store
func (*Collector) ArgCount ¶ added in v0.0.8
ArgCount calculate the number of expected arguments for a specified query with this driver.
func (*Collector) ConfigSurvey ¶
ConfigSurvey is an implementation of Driver
func (*Collector) ExpectedOut ¶
ExpectedOut returns true and the number of expected outbound records,
func (*Collector) GetCollection ¶
func (c *Collector) GetCollection() []ResultCollectionItem
GetCollection returns slice of ResultCollectionItem
func (*Collector) HasCountQuery ¶
HasCountQuery is false for Collector
func (*Collector) HasInQuery ¶
HasInQuery is false for Collector
func (*Collector) HasOutQuery ¶
HasOutQuery is false for Collector
type Config ¶
type Config map[string]interface{}
Config is a map or configuration data specific to a specialized Driver
type Debug ¶
type Debug struct {
// contains filtered or unexported fields
}
Debug implements data.Driver
func (*Debug) ArgCount ¶ added in v0.0.8
ArgCount calculate the number of expected arguments for a specified query with this driver.
func (*Debug) ConfigSurvey ¶
ConfigSurvey is an implementation of Driver
func (*Debug) ExpectedOut ¶
ExpectedOut returns true and the number of expected outbound records, false value mean indefinite.
type Driver ¶
type Driver interface { Configure(config Config) error // Takes a config map ConfigSurvey(config Config, machineName string) error // Interactive config generator Init() // Initialization tasks (as drivers may be reused) Out(query string, args []string) (<-chan Record, error) // outbound data In(query string, args []string, record Record) error // inbound data Done() error // finalization tasks when runner is done with In // ExpectedOut is the number of records we expect // from the source, some drivers can determine // expected output without a source query ArgCount(query string) int // returns the number of expected args for a query ExpectedOut() (bool, int, error) // a false return means indefinite HasOutQuery() bool // does this driver use a query to get data HasInQuery() bool // does this driver use a query to set data HasCountQuery() bool // does this driver have a count query }
Driver managed configuration and of a database and executes queries against it.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles the collection of drivers
func (*Manager) GetNewDriver ¶
GetNewDriver returns a new un-configured Driver
func (*Manager) RegisteredDrivers ¶
RegisteredDrivers returns a string slice of driver machine names
type MySql ¶
type MySql struct {
// contains filtered or unexported fields
}
MySql implements data.Driver
func (*MySql) ArgCount ¶ added in v0.0.8
ArgCount calculate the numer of expected arguments for a specified query with this driver.
func (*MySql) ConfigSurvey ¶
ConfigSurvey is an implementation of Driver
func (*MySql) ExpectedOut ¶
ExpectedOut returns true and the number of expected outbound records, false value mean indefinite. TODO: implement expected out for MySQL
type ResultCollection ¶
type ResultCollection []ResultCollectionItem
ResultCollection represents a slice of ResultCollectionItem
type ResultCollectionItem ¶
ResultCollectionItem represents a set of records and corresponding args.