Documentation ¶
Overview ¶
*
- 集群数据结构
*
- 库数据结构
*
- 用户数据结构
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterInfo ¶
type ClusterInfo struct { Id int `json:"id"` Name string `json:"name"` MasterUrl string `json:"master_url"` GatewayHttpUrl string `json:"gateway_http"` GatewaySqlUrl string `json:"gateway_sql"` ClusterToken string `json:"cluster_sign"` CreateTime int64 `json:"create_time"` //true 表示禁止自动分片 AutoSplitUnable bool `json:"auto_split"` //true 表示禁止自动迁移 AutoTransferUnable bool `json:"auto_transfer"` // true 表示禁止自动failover AutoFailoverUnable bool `json:"auto_failover"` }
func BuildClusterInfo ¶
func NewClusterInfo ¶
func NewClusterInfo() *ClusterInfo
type Column ¶
type Column struct { // max size 128 bytes Name string `json:"name,omitempty"` // 列名映射的ID Id uint64 `json:"id,omitempty"` DataType int `json:"data_type,omitempty"` // 针对int类型,是否是无符号类型 Unsigned bool `son:"unsigned,omitempty"` // 针对float和varchar类型 Scale int32 `json:"scale,omitempty"` // 针对float类型 Precision int32 `json:"precision,omitempty"` // 是否可以为空 Nullable bool `json:"nullable,omitempty"` // 是否主键 PrimaryKey uint64 `json:"primary_key,omitempty"` // 列的顺序 Ordinal int32 `json:"ordinal,omitempty"` // 索引 Binary不支持索引,其他类型列默认均是索引列 Index bool `json:"index,omitempty"` DefaultValue []byte `json:"default_value,omitempty"` Properties string `json:"properties,omitempty"` }
type ColumnInfo ¶
type DsNode ¶
type DsNode struct { Id uint64 `json:"id,omitempty"` // rpc 服务地址 ServerAddr string `json:"server_addr,omitempty"` // raft 服务地址 RaftAddr string `json:"raft_addr,omitempty"` // http 管理地址 HttpAddr string `json:"http_addr,omitempty"` State int32 `json:"state,omitempty"` Version string `json:"version,omitempty"` }
type MetricConfig ¶ added in v0.6.3
type MetricServer ¶ added in v0.6.3
type MetricServer struct {
Addr string `json:"addr"`
}
type NamespaceApply ¶
type PeerBrief ¶
type PeerBrief struct { Id uint64 `json:"id,omitempty"` Index uint64 `json:"index,omitempty"` Term uint64 `json:"term,omitempty"` Commit uint64 `json:"commit,omitempty"` StartKey string `json:"start_key,omitempty"` EndKey string `json:"end_key,omitempty"` NodeId uint64 `json:"node_id,omitempty"` NodeAddress string `json:"node_address,omitempty"` // contains filtered or unexported fields }
type Range ¶
type Range struct { Id uint64 `json:"id,omitempty"` // Range key range [start_key, end_key). StartKey []byte `json:"start_key,omitempty"` EndKey []byte `json:"end_key,omitempty"` RangeEpoch *metapb.RangeEpoch `json:"range_epoch,omitempty"` Peers []*Peer `json:"peers,omitempty"` // Range state State int32 `json:"state,omitempty"` DbName string `json:"db_name,omitempty"` TableName string `json:"table_name,omitempty"` TableId uint64 `json:"table_id,omitempty"` CreateTime int64 `json:"create_time,omitempty"` LastHbTime string `json:"last_hb_time,omitempty"` }
type RangeBrief ¶
type RangeBrief struct { Id uint64 `json:"id,omitempty"` StartKey string `json:"start_key,omitempty"` EndKey string `json:"end_key,omitempty"` State int32 `json:"state,omitempty"` LastHbTime string `json:"last_hb_time,omitempty"` DownPeers []uint64 `json:"down_peers,omitempty"` Peers []uint64 `json:"peers,omitempty"` Leader uint64 `json:"leader,omitempty"` }
type SqlApply ¶ added in v0.6.3
type SqlApply struct { Id string `json:"id"` DbName string `json:"db_name"` TableName string `json:"table_name"` Sentence string `json:"sentence"` Status int8 `json:"status"` Applyer string `json:"applyer"` Auditor string `json:"auditor"` CreateTime int64 `json:"create_time"` Remark string `json:"remark"` }
type UserInfo ¶
type UserInfo struct { Id string Erp string Mail string Tel string UserName string RealName string // SuperiorId string SuperiorName string Department1 string Department2 string OrganizationName string CreateTime string ModifyDate string }
func NewUserInfo ¶
func NewUserInfo() *UserInfo
type UserPrivilege ¶
type UserPrivilege struct { UserName string `json:"user_name"` ClusterId uint64 `json:"cluster_id"` Privilege uint64 `json:"privilege"` }
func NewUserPrivilege ¶
func NewUserPrivilege() *UserPrivilege
Click to show internal directories.
Click to hide internal directories.