Documentation ¶
Index ¶
- Variables
- func OpenDB(name, username, password string, logf reform.Printf) (*sql.DB, error)
- type Agent
- func (s *Agent) HasPK() bool
- func (s *Agent) PKPointer() interface{}
- func (s *Agent) PKValue() interface{}
- func (s *Agent) Pointers() []interface{}
- func (s *Agent) SetPK(pk interface{})
- func (s Agent) String() string
- func (s *Agent) Table() reform.Table
- func (s *Agent) Values() []interface{}
- func (s *Agent) View() reform.View
- type AgentNode
- type AgentService
- type AgentType
- type MySQLdExporter
- func (m *MySQLdExporter) DSN(service *RDSService) string
- func (s *MySQLdExporter) HasPK() bool
- func (m *MySQLdExporter) NameForSupervisor() string
- func (s *MySQLdExporter) PKPointer() interface{}
- func (s *MySQLdExporter) PKValue() interface{}
- func (s *MySQLdExporter) Pointers() []interface{}
- func (s *MySQLdExporter) SetPK(pk interface{})
- func (s MySQLdExporter) String() string
- func (s *MySQLdExporter) Table() reform.Table
- func (s *MySQLdExporter) Values() []interface{}
- func (s *MySQLdExporter) View() reform.View
- type Node
- func (s *Node) HasPK() bool
- func (s *Node) PKPointer() interface{}
- func (s *Node) PKValue() interface{}
- func (s *Node) Pointers() []interface{}
- func (s *Node) SetPK(pk interface{})
- func (s Node) String() string
- func (s *Node) Table() reform.Table
- func (s *Node) Values() []interface{}
- func (s *Node) View() reform.View
- type NodeType
- type QanAgent
- func (q *QanAgent) DSN(service *RDSService) string
- func (s *QanAgent) HasPK() bool
- func (q *QanAgent) NameForSupervisor() string
- func (s *QanAgent) PKPointer() interface{}
- func (s *QanAgent) PKValue() interface{}
- func (s *QanAgent) Pointers() []interface{}
- func (s *QanAgent) SetPK(pk interface{})
- func (s QanAgent) String() string
- func (s *QanAgent) Table() reform.Table
- func (s *QanAgent) Values() []interface{}
- func (s *QanAgent) View() reform.View
- type RDSExporter
- func (s *RDSExporter) HasPK() bool
- func (r *RDSExporter) NameForSupervisor() string
- func (s *RDSExporter) PKPointer() interface{}
- func (s *RDSExporter) PKValue() interface{}
- func (s *RDSExporter) Pointers() []interface{}
- func (s *RDSExporter) SetPK(pk interface{})
- func (s RDSExporter) String() string
- func (s *RDSExporter) Table() reform.Table
- func (s *RDSExporter) Values() []interface{}
- func (s *RDSExporter) View() reform.View
- type RDSNode
- func (s *RDSNode) HasPK() bool
- func (s *RDSNode) PKPointer() interface{}
- func (s *RDSNode) PKValue() interface{}
- func (s *RDSNode) Pointers() []interface{}
- func (s *RDSNode) SetPK(pk interface{})
- func (s RDSNode) String() string
- func (s *RDSNode) Table() reform.Table
- func (s *RDSNode) Values() []interface{}
- func (s *RDSNode) View() reform.View
- type RDSService
- func (s *RDSService) HasPK() bool
- func (s *RDSService) PKPointer() interface{}
- func (s *RDSService) PKValue() interface{}
- func (s *RDSService) Pointers() []interface{}
- func (s *RDSService) SetPK(pk interface{})
- func (s RDSService) String() string
- func (s *RDSService) Table() reform.Table
- func (s *RDSService) Values() []interface{}
- func (s *RDSService) View() reform.View
- type Service
- func (s *Service) HasPK() bool
- func (s *Service) PKPointer() interface{}
- func (s *Service) PKValue() interface{}
- func (s *Service) Pointers() []interface{}
- func (s *Service) SetPK(pk interface{})
- func (s Service) String() string
- func (s *Service) Table() reform.Table
- func (s *Service) Values() []interface{}
- func (s *Service) View() reform.View
- type ServiceType
Constants ¶
This section is empty.
Variables ¶
var AgentNodeView = &agentNodeViewType{ s: parse.StructInfo{Type: "AgentNode", SQLSchema: "", SQLName: "agent_nodes", Fields: []parse.FieldInfo{{Name: "AgentID", Type: "int32", Column: "agent_id"}, {Name: "NodeID", Type: "int32", Column: "node_id"}}, PKFieldIndex: -1}, z: new(AgentNode).Values(), }
AgentNodeView represents agent_nodes view or table in SQL database.
var AgentServiceView = &agentServiceViewType{ s: parse.StructInfo{Type: "AgentService", SQLSchema: "", SQLName: "agent_services", Fields: []parse.FieldInfo{{Name: "AgentID", Type: "int32", Column: "agent_id"}, {Name: "ServiceID", Type: "int32", Column: "service_id"}}, PKFieldIndex: -1}, z: new(AgentService).Values(), }
AgentServiceView represents agent_services view or table in SQL database.
var AgentTable = &agentTableType{ s: parse.StructInfo{Type: "Agent", SQLSchema: "", SQLName: "agents", Fields: []parse.FieldInfo{{Name: "ID", Type: "int32", Column: "id"}, {Name: "Type", Type: "AgentType", Column: "type"}, {Name: "RunsOnNodeID", Type: "int32", Column: "runs_on_node_id"}}, PKFieldIndex: 0}, z: new(Agent).Values(), }
AgentTable represents agents view or table in SQL database.
var MySQLdExporterTable = &mySQLdExporterTableType{ s: parse.StructInfo{Type: "MySQLdExporter", SQLSchema: "", SQLName: "agents", Fields: []parse.FieldInfo{{Name: "ID", Type: "int32", Column: "id"}, {Name: "Type", Type: "AgentType", Column: "type"}, {Name: "RunsOnNodeID", Type: "int32", Column: "runs_on_node_id"}, {Name: "ServiceUsername", Type: "*string", Column: "service_username"}, {Name: "ServicePassword", Type: "*string", Column: "service_password"}, {Name: "ListenPort", Type: "*uint16", Column: "listen_port"}}, PKFieldIndex: 0}, z: new(MySQLdExporter).Values(), }
MySQLdExporterTable represents agents view or table in SQL database.
var NodeTable = &nodeTableType{ s: parse.StructInfo{Type: "Node", SQLSchema: "", SQLName: "nodes", Fields: []parse.FieldInfo{{Name: "ID", Type: "int32", Column: "id"}, {Name: "Type", Type: "NodeType", Column: "type"}, {Name: "Name", Type: "string", Column: "name"}}, PKFieldIndex: 0}, z: new(Node).Values(), }
NodeTable represents nodes view or table in SQL database.
var QanAgentTable = &qanAgentTableType{ s: parse.StructInfo{Type: "QanAgent", SQLSchema: "", SQLName: "agents", Fields: []parse.FieldInfo{{Name: "ID", Type: "int32", Column: "id"}, {Name: "Type", Type: "AgentType", Column: "type"}, {Name: "RunsOnNodeID", Type: "int32", Column: "runs_on_node_id"}, {Name: "ServiceUsername", Type: "*string", Column: "service_username"}, {Name: "ServicePassword", Type: "*string", Column: "service_password"}, {Name: "ListenPort", Type: "*uint16", Column: "listen_port"}, {Name: "QANDBInstanceUUID", Type: "*string", Column: "qan_db_instance_uuid"}}, PKFieldIndex: 0}, z: new(QanAgent).Values(), }
QanAgentTable represents agents view or table in SQL database.
var RDSExporterTable = &rDSExporterTableType{ s: parse.StructInfo{Type: "RDSExporter", SQLSchema: "", SQLName: "agents", Fields: []parse.FieldInfo{{Name: "ID", Type: "int32", Column: "id"}, {Name: "Type", Type: "AgentType", Column: "type"}, {Name: "RunsOnNodeID", Type: "int32", Column: "runs_on_node_id"}, {Name: "ListenPort", Type: "*uint16", Column: "listen_port"}}, PKFieldIndex: 0}, z: new(RDSExporter).Values(), }
RDSExporterTable represents agents view or table in SQL database.
var RDSNodeTable = &rDSNodeTableType{ s: parse.StructInfo{Type: "RDSNode", SQLSchema: "", SQLName: "nodes", Fields: []parse.FieldInfo{{Name: "ID", Type: "int32", Column: "id"}, {Name: "Type", Type: "NodeType", Column: "type"}, {Name: "Name", Type: "string", Column: "name"}, {Name: "Region", Type: "string", Column: "region"}}, PKFieldIndex: 0}, z: new(RDSNode).Values(), }
RDSNodeTable represents nodes view or table in SQL database.
var RDSServiceTable = &rDSServiceTableType{ s: parse.StructInfo{Type: "RDSService", SQLSchema: "", SQLName: "services", Fields: []parse.FieldInfo{{Name: "ID", Type: "int32", Column: "id"}, {Name: "Type", Type: "ServiceType", Column: "type"}, {Name: "NodeID", Type: "int32", Column: "node_id"}, {Name: "AWSAccessKey", Type: "*string", Column: "aws_access_key"}, {Name: "AWSSecretKey", Type: "*string", Column: "aws_secret_key"}, {Name: "Address", Type: "*string", Column: "address"}, {Name: "Port", Type: "*uint16", Column: "port"}, {Name: "Engine", Type: "*string", Column: "engine"}, {Name: "EngineVersion", Type: "*string", Column: "engine_version"}}, PKFieldIndex: 0}, z: new(RDSService).Values(), }
RDSServiceTable represents services view or table in SQL database.
var ServiceTable = &serviceTableType{ s: parse.StructInfo{Type: "Service", SQLSchema: "", SQLName: "services", Fields: []parse.FieldInfo{{Name: "ID", Type: "int32", Column: "id"}, {Name: "Type", Type: "ServiceType", Column: "type"}, {Name: "NodeID", Type: "int32", Column: "node_id"}}, PKFieldIndex: 0}, z: new(Service).Values(), }
ServiceTable represents services view or table in SQL database.
Functions ¶
Types ¶
type Agent ¶
type Agent struct { ID int32 `reform:"id,pk"` Type AgentType `reform:"type"` RunsOnNodeID int32 `reform:"runs_on_node_id"` }
func AgentsForNodeID ¶
AgentsForNodeID returns agents providing insights for a given node.
func AgentsForServiceID ¶
AgentsForServiceID returns agents providing insights for a given service.
func (*Agent) PKPointer ¶
func (s *Agent) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Agent) PKValue ¶
func (s *Agent) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Agent) Pointers ¶
func (s *Agent) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Agent) Table ¶
func (s *Agent) Table() reform.Table
Table returns Table object for that record.
type AgentNode ¶
func (*AgentNode) Pointers ¶
func (s *AgentNode) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
type AgentService ¶
type AgentService struct { AgentID int32 `reform:"agent_id"` ServiceID int32 `reform:"service_id"` }
func (*AgentService) Pointers ¶
func (s *AgentService) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (AgentService) String ¶
func (s AgentService) String() string
String returns a string representation of this struct or record.
func (*AgentService) Values ¶
func (s *AgentService) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*AgentService) View ¶
func (s *AgentService) View() reform.View
View returns View object for that struct.
type MySQLdExporter ¶
type MySQLdExporter struct { ID int32 `reform:"id,pk"` Type AgentType `reform:"type"` RunsOnNodeID int32 `reform:"runs_on_node_id"` ServiceUsername *string `reform:"service_username"` ServicePassword *string `reform:"service_password"` ListenPort *uint16 `reform:"listen_port"` }
func (*MySQLdExporter) DSN ¶
func (m *MySQLdExporter) DSN(service *RDSService) string
func (*MySQLdExporter) HasPK ¶
func (s *MySQLdExporter) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*MySQLdExporter) NameForSupervisor ¶
func (m *MySQLdExporter) NameForSupervisor() string
func (*MySQLdExporter) PKPointer ¶
func (s *MySQLdExporter) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*MySQLdExporter) PKValue ¶
func (s *MySQLdExporter) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*MySQLdExporter) Pointers ¶
func (s *MySQLdExporter) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*MySQLdExporter) SetPK ¶
func (s *MySQLdExporter) SetPK(pk interface{})
SetPK sets record primary key.
func (MySQLdExporter) String ¶
func (s MySQLdExporter) String() string
String returns a string representation of this struct or record.
func (*MySQLdExporter) Table ¶
func (s *MySQLdExporter) Table() reform.Table
Table returns Table object for that record.
func (*MySQLdExporter) Values ¶
func (s *MySQLdExporter) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*MySQLdExporter) View ¶
func (s *MySQLdExporter) View() reform.View
View returns View object for that struct.
type Node ¶
type Node struct { ID int32 `reform:"id,pk"` Type NodeType `reform:"type"` Name string `reform:"name"` }
func (*Node) PKPointer ¶
func (s *Node) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Node) PKValue ¶
func (s *Node) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Node) Pointers ¶
func (s *Node) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Node) Table ¶
func (s *Node) Table() reform.Table
Table returns Table object for that record.
type QanAgent ¶
type QanAgent struct { ID int32 `reform:"id,pk"` Type AgentType `reform:"type"` RunsOnNodeID int32 `reform:"runs_on_node_id"` ServiceUsername *string `reform:"service_username"` ServicePassword *string `reform:"service_password"` ListenPort *uint16 `reform:"listen_port"` QANDBInstanceUUID *string `reform:"qan_db_instance_uuid"` // MySQL instance UUID in QAN }
func (*QanAgent) DSN ¶
func (q *QanAgent) DSN(service *RDSService) string
func (*QanAgent) HasPK ¶
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*QanAgent) NameForSupervisor ¶
func (*QanAgent) PKPointer ¶
func (s *QanAgent) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*QanAgent) PKValue ¶
func (s *QanAgent) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*QanAgent) Pointers ¶
func (s *QanAgent) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*QanAgent) Table ¶
func (s *QanAgent) Table() reform.Table
Table returns Table object for that record.
type RDSExporter ¶ added in v1.6.0
type RDSExporter struct { ID int32 `reform:"id,pk"` Type AgentType `reform:"type"` RunsOnNodeID int32 `reform:"runs_on_node_id"` ListenPort *uint16 `reform:"listen_port"` }
func (*RDSExporter) HasPK ¶ added in v1.6.0
func (s *RDSExporter) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*RDSExporter) NameForSupervisor ¶ added in v1.6.0
func (r *RDSExporter) NameForSupervisor() string
func (*RDSExporter) PKPointer ¶ added in v1.6.0
func (s *RDSExporter) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*RDSExporter) PKValue ¶ added in v1.6.0
func (s *RDSExporter) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*RDSExporter) Pointers ¶ added in v1.6.0
func (s *RDSExporter) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*RDSExporter) SetPK ¶ added in v1.6.0
func (s *RDSExporter) SetPK(pk interface{})
SetPK sets record primary key.
func (RDSExporter) String ¶ added in v1.6.0
func (s RDSExporter) String() string
String returns a string representation of this struct or record.
func (*RDSExporter) Table ¶ added in v1.6.0
func (s *RDSExporter) Table() reform.Table
Table returns Table object for that record.
func (*RDSExporter) Values ¶ added in v1.6.0
func (s *RDSExporter) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*RDSExporter) View ¶ added in v1.6.0
func (s *RDSExporter) View() reform.View
View returns View object for that struct.
type RDSNode ¶
type RDSNode struct { ID int32 `reform:"id,pk"` Type NodeType `reform:"type"` Name string `reform:"name"` // DBInstanceIdentifier Region string `reform:"region"` }
func (*RDSNode) PKPointer ¶
func (s *RDSNode) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*RDSNode) PKValue ¶
func (s *RDSNode) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*RDSNode) Pointers ¶
func (s *RDSNode) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*RDSNode) Table ¶
func (s *RDSNode) Table() reform.Table
Table returns Table object for that record.
type RDSService ¶
type RDSService struct { ID int32 `reform:"id,pk"` Type ServiceType `reform:"type"` NodeID int32 `reform:"node_id"` AWSAccessKey *string `reform:"aws_access_key"` // may be nil AWSSecretKey *string `reform:"aws_secret_key"` // may be nil Address *string `reform:"address"` Port *uint16 `reform:"port"` Engine *string `reform:"engine"` EngineVersion *string `reform:"engine_version"` }
func (*RDSService) HasPK ¶
func (s *RDSService) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*RDSService) PKPointer ¶
func (s *RDSService) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*RDSService) PKValue ¶
func (s *RDSService) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*RDSService) Pointers ¶
func (s *RDSService) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*RDSService) SetPK ¶
func (s *RDSService) SetPK(pk interface{})
SetPK sets record primary key.
func (RDSService) String ¶
func (s RDSService) String() string
String returns a string representation of this struct or record.
func (*RDSService) Table ¶
func (s *RDSService) Table() reform.Table
Table returns Table object for that record.
func (*RDSService) Values ¶
func (s *RDSService) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*RDSService) View ¶
func (s *RDSService) View() reform.View
View returns View object for that struct.
type Service ¶
type Service struct { ID int32 `reform:"id,pk"` Type ServiceType `reform:"type"` NodeID int32 `reform:"node_id"` }
func (*Service) PKPointer ¶
func (s *Service) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Service) PKValue ¶
func (s *Service) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Service) Pointers ¶
func (s *Service) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Service) Table ¶
func (s *Service) Table() reform.Table
Table returns Table object for that record.
type ServiceType ¶
type ServiceType string
const (
RDSServiceType ServiceType = "rds"
)
func (*ServiceType) Scan ¶
func (u *ServiceType) Scan(src interface{}) error