Documentation
¶
Index ¶
- func Close()
- func Init(dbPath string) error
- func SaveECSRecords(records []ECSRecord) error
- func SavePolarDBRecords(records []PolarDBRecord) error
- func SaveRDSRecords(records []RDSRecord) error
- func SaveRedisRecords(records []RedisRecord) error
- func SaveSLBRecords(records []SLBRecord) error
- type ECSRecord
- type PolarDBRecord
- type RDSRecord
- type RedisRecord
- type SLBRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveECSRecords ¶
SaveECSRecords 将一组 ECS 实例记录保存到数据库
func SavePolarDBRecords ¶
func SavePolarDBRecords(records []PolarDBRecord) error
func SaveRDSRecords ¶
func SaveRedisRecords ¶
func SaveRedisRecords(records []RedisRecord) error
func SaveSLBRecords ¶
Types ¶
type ECSRecord ¶
type ECSRecord struct {
InstanceID string // 实例ID
CloudName string // 账户名称
InstanceName string // 实例名称
Status string // 实例状态
RegionID string // 区域ID
OSName string // 操作系统名称
InstanceType string // 实例规格
CPU int64 // CPU核数
Memory int64 // 内存大小
PublicIP string // 公网IP地址(逗号分隔)
PrivateIP string // 内网IP地址
}
ECSRecord 定义 ECS 记录的本地结构,用于数据库读写
type PolarDBRecord ¶
type PolarDBRecord struct {
InstanceID string
CloudName string
Engine string
RegionID string
Status string
DBNodeCount int64
Description string
MemorySize int64
ConnectionString string
}
PolarDB 数据结构和保存
func ListPolarDBRecords ¶
func ListPolarDBRecords() ([]PolarDBRecord, error)
查询所有 Polardb 记录(用于 API 层示例)
type RDSRecord ¶
type RDSRecord struct {
InstanceID string
CloudName string
Engine string
RegionID string
Status string
Memory int64
Description string
ConnectionString string
}
RDS 数据结构和保存
type RedisRecord ¶
type RedisRecord struct {
InstanceID string
CloudName string
InstanceName string
Port int64
RegionId string
Capacity int64
InstanceClass string
QPS int64
Bandwidth int64
Connections int64
InstanceType string
ConnectionString string
IPAddress string
}
Tair 数据结构和保存
func ListRedisRecords ¶
func ListRedisRecords() ([]RedisRecord, error)
查询所有 Tair Redis 记录(用于 API 层示例)
Click to show internal directories.
Click to hide internal directories.