Documentation ¶
Index ¶
- Constants
- Variables
- func NameForSupervisor(typ AgentType, listenPort uint16) string
- 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 MySQLService
- func (s *MySQLService) HasPK() bool
- func (s *MySQLService) PKPointer() interface{}
- func (s *MySQLService) PKValue() interface{}
- func (s *MySQLService) Pointers() []interface{}
- func (s *MySQLService) SetPK(pk interface{})
- func (s MySQLService) String() string
- func (s *MySQLService) Table() reform.Table
- func (s *MySQLService) Values() []interface{}
- func (s *MySQLService) View() reform.View
- type MySQLdExporter
- func (m *MySQLdExporter) DSN(service *MySQLService) string
- func (s *MySQLdExporter) HasPK() bool
- 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 PostgreSQLService
- func (s *PostgreSQLService) HasPK() bool
- func (s *PostgreSQLService) PKPointer() interface{}
- func (s *PostgreSQLService) PKValue() interface{}
- func (s *PostgreSQLService) Pointers() []interface{}
- func (s *PostgreSQLService) SetPK(pk interface{})
- func (s PostgreSQLService) String() string
- func (s *PostgreSQLService) Table() reform.Table
- func (s *PostgreSQLService) Values() []interface{}
- func (s *PostgreSQLService) View() reform.View
- type PostgresExporter
- func (p *PostgresExporter) DSN(service *PostgreSQLService) string
- func (s *PostgresExporter) HasPK() bool
- func (s *PostgresExporter) PKPointer() interface{}
- func (s *PostgresExporter) PKValue() interface{}
- func (s *PostgresExporter) Pointers() []interface{}
- func (s *PostgresExporter) SetPK(pk interface{})
- func (s PostgresExporter) String() string
- func (s *PostgresExporter) Table() reform.Table
- func (s *PostgresExporter) Values() []interface{}
- func (s *PostgresExporter) View() reform.View
- type QanAgent
- func (q *QanAgent) DSN(service *MySQLService) string
- func (s *QanAgent) HasPK() bool
- 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 (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 RemoteNode
- func (s *RemoteNode) HasPK() bool
- func (s *RemoteNode) PKPointer() interface{}
- func (s *RemoteNode) PKValue() interface{}
- func (s *RemoteNode) Pointers() []interface{}
- func (s *RemoteNode) SetPK(pk interface{})
- func (s RemoteNode) String() string
- func (s *RemoteNode) Table() reform.Table
- func (s *RemoteNode) Values() []interface{}
- func (s *RemoteNode) View() reform.View
- type RemoteService
- func (s *RemoteService) HasPK() bool
- func (s *RemoteService) PKPointer() interface{}
- func (s *RemoteService) PKValue() interface{}
- func (s *RemoteService) Pointers() []interface{}
- func (s *RemoteService) SetPK(pk interface{})
- func (s RemoteService) String() string
- func (s *RemoteService) Table() reform.Table
- func (s *RemoteService) Values() []interface{}
- func (s *RemoteService) 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 ¶
const RemoteNodeRegion string = "remote"
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"}, {Name: "ListenPort", Type: "*uint16", Column: "listen_port"}}, PKFieldIndex: 0}, z: new(Agent).Values(), }
AgentTable represents agents view or table in SQL database.
var MySQLServiceTable = &mySQLServiceTableType{ s: parse.StructInfo{Type: "MySQLService", 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: "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(MySQLService).Values(), }
MySQLServiceTable represents services 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"}, {Name: "MySQLDisableTablestats", Type: "*bool", Column: "mysql_disable_tablestats"}}, 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 PostgreSQLServiceTable = &postgreSQLServiceTableType{ s: parse.StructInfo{Type: "PostgreSQLService", 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: "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(PostgreSQLService).Values(), }
PostgreSQLServiceTable represents services view or table in SQL database.
var PostgresExporterTable = &postgresExporterTableType{ s: parse.StructInfo{Type: "PostgresExporter", 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(PostgresExporter).Values(), }
PostgresExporterTable represents agents 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 RemoteNodeTable = &remoteNodeTableType{ s: parse.StructInfo{Type: "RemoteNode", 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(RemoteNode).Values(), }
RemoteNodeTable represents nodes view or table in SQL database.
var RemoteServiceTable = &remoteServiceTableType{ s: parse.StructInfo{Type: "RemoteService", 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: "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(RemoteService).Values(), }
RemoteServiceTable 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 ¶
func NameForSupervisor ¶ added in v1.16.0
NameForSupervisor returns a name of agent for supervisor.
Types ¶
type Agent ¶
type Agent struct { ID int32 `reform:"id,pk"` Type AgentType `reform:"type"` RunsOnNodeID int32 `reform:"runs_on_node_id"` // TODO Does it really belong there? Remove when we have agent without one. ListenPort *uint16 `reform:"listen_port"` }
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 MySQLService ¶ added in v1.16.0
type MySQLService struct { ID int32 `reform:"id,pk"` Type ServiceType `reform:"type"` NodeID int32 `reform:"node_id"` Address *string `reform:"address"` Port *uint16 `reform:"port"` Engine *string `reform:"engine"` EngineVersion *string `reform:"engine_version"` }
func (*MySQLService) HasPK ¶ added in v1.16.0
func (s *MySQLService) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*MySQLService) PKPointer ¶ added in v1.16.0
func (s *MySQLService) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*MySQLService) PKValue ¶ added in v1.16.0
func (s *MySQLService) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*MySQLService) Pointers ¶ added in v1.16.0
func (s *MySQLService) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*MySQLService) SetPK ¶ added in v1.16.0
func (s *MySQLService) SetPK(pk interface{})
SetPK sets record primary key.
func (MySQLService) String ¶ added in v1.16.0
func (s MySQLService) String() string
String returns a string representation of this struct or record.
func (*MySQLService) Table ¶ added in v1.16.0
func (s *MySQLService) Table() reform.Table
Table returns Table object for that record.
func (*MySQLService) Values ¶ added in v1.16.0
func (s *MySQLService) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*MySQLService) View ¶ added in v1.16.0
func (s *MySQLService) 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"` MySQLDisableTablestats *bool `reform:"mysql_disable_tablestats"` }
func (*MySQLdExporter) DSN ¶
func (m *MySQLdExporter) DSN(service *MySQLService) string
func (*MySQLdExporter) HasPK ¶
func (s *MySQLdExporter) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
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 PostgreSQLService ¶ added in v1.16.0
type PostgreSQLService struct { ID int32 `reform:"id,pk"` Type ServiceType `reform:"type"` NodeID int32 `reform:"node_id"` Address *string `reform:"address"` Port *uint16 `reform:"port"` Engine *string `reform:"engine"` EngineVersion *string `reform:"engine_version"` }
func (*PostgreSQLService) HasPK ¶ added in v1.16.0
func (s *PostgreSQLService) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*PostgreSQLService) PKPointer ¶ added in v1.16.0
func (s *PostgreSQLService) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*PostgreSQLService) PKValue ¶ added in v1.16.0
func (s *PostgreSQLService) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*PostgreSQLService) Pointers ¶ added in v1.16.0
func (s *PostgreSQLService) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*PostgreSQLService) SetPK ¶ added in v1.16.0
func (s *PostgreSQLService) SetPK(pk interface{})
SetPK sets record primary key.
func (PostgreSQLService) String ¶ added in v1.16.0
func (s PostgreSQLService) String() string
String returns a string representation of this struct or record.
func (*PostgreSQLService) Table ¶ added in v1.16.0
func (s *PostgreSQLService) Table() reform.Table
Table returns Table object for that record.
func (*PostgreSQLService) Values ¶ added in v1.16.0
func (s *PostgreSQLService) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*PostgreSQLService) View ¶ added in v1.16.0
func (s *PostgreSQLService) View() reform.View
View returns View object for that struct.
type PostgresExporter ¶ added in v1.16.0
type PostgresExporter 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"` }
PostgresExporter exports PostgreSQL metrics.
func (*PostgresExporter) DSN ¶ added in v1.16.0
func (p *PostgresExporter) DSN(service *PostgreSQLService) string
DSN returns DSN for PostgreSQL service.
func (*PostgresExporter) HasPK ¶ added in v1.16.0
func (s *PostgresExporter) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*PostgresExporter) PKPointer ¶ added in v1.16.0
func (s *PostgresExporter) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*PostgresExporter) PKValue ¶ added in v1.16.0
func (s *PostgresExporter) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*PostgresExporter) Pointers ¶ added in v1.16.0
func (s *PostgresExporter) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*PostgresExporter) SetPK ¶ added in v1.16.0
func (s *PostgresExporter) SetPK(pk interface{})
SetPK sets record primary key.
func (PostgresExporter) String ¶ added in v1.16.0
func (s PostgresExporter) String() string
String returns a string representation of this struct or record.
func (*PostgresExporter) Table ¶ added in v1.16.0
func (s *PostgresExporter) Table() reform.Table
Table returns Table object for that record.
func (*PostgresExporter) Values ¶ added in v1.16.0
func (s *PostgresExporter) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*PostgresExporter) View ¶ added in v1.16.0
func (s *PostgresExporter) View() reform.View
View returns View object for that struct.
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 *MySQLService) string
func (*QanAgent) HasPK ¶
HasPK returns true if record has non-zero primary key set, false otherwise.
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) 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"` // not a pointer, see database structure }
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 RemoteNode ¶ added in v1.16.0
type RemoteNode struct { ID int32 `reform:"id,pk"` Type NodeType `reform:"type"` Name string `reform:"name"` // DBInstanceIdentifier Region string `reform:"region"` // not a pointer, see database structure }
func (*RemoteNode) HasPK ¶ added in v1.16.0
func (s *RemoteNode) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*RemoteNode) PKPointer ¶ added in v1.16.0
func (s *RemoteNode) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*RemoteNode) PKValue ¶ added in v1.16.0
func (s *RemoteNode) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*RemoteNode) Pointers ¶ added in v1.16.0
func (s *RemoteNode) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*RemoteNode) SetPK ¶ added in v1.16.0
func (s *RemoteNode) SetPK(pk interface{})
SetPK sets record primary key.
func (RemoteNode) String ¶ added in v1.16.0
func (s RemoteNode) String() string
String returns a string representation of this struct or record.
func (*RemoteNode) Table ¶ added in v1.16.0
func (s *RemoteNode) Table() reform.Table
Table returns Table object for that record.
func (*RemoteNode) Values ¶ added in v1.16.0
func (s *RemoteNode) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*RemoteNode) View ¶ added in v1.16.0
func (s *RemoteNode) View() reform.View
View returns View object for that struct.
type RemoteService ¶ added in v1.16.0
type RemoteService struct { ID int32 `reform:"id,pk"` Type ServiceType `reform:"type"` NodeID int32 `reform:"node_id"` Address *string `reform:"address"` Port *uint16 `reform:"port"` Engine *string `reform:"engine"` EngineVersion *string `reform:"engine_version"` }
func (*RemoteService) HasPK ¶ added in v1.16.0
func (s *RemoteService) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*RemoteService) PKPointer ¶ added in v1.16.0
func (s *RemoteService) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*RemoteService) PKValue ¶ added in v1.16.0
func (s *RemoteService) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*RemoteService) Pointers ¶ added in v1.16.0
func (s *RemoteService) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*RemoteService) SetPK ¶ added in v1.16.0
func (s *RemoteService) SetPK(pk interface{})
SetPK sets record primary key.
func (RemoteService) String ¶ added in v1.16.0
func (s RemoteService) String() string
String returns a string representation of this struct or record.
func (*RemoteService) Table ¶ added in v1.16.0
func (s *RemoteService) Table() reform.Table
Table returns Table object for that record.
func (*RemoteService) Values ¶ added in v1.16.0
func (s *RemoteService) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*RemoteService) View ¶ added in v1.16.0
func (s *RemoteService) 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" PostgreSQLServiceType ServiceType = "postgresql" MySQLServiceType ServiceType = "mysql" )