Versions in this module Expand all Collapse all v1 v1.0.0 May 24, 2019 Changes in this version + const ConfigEtcd + const ConfigFile + const NoReadWriteSplit + const ReadOnly + const ReadWrite + const ReadWriteSplit + const ShardDay + const ShardDefault + const ShardGlobal + const ShardHash + const ShardLinked + const ShardMod + const ShardMonth + const ShardMycatLong + const ShardMycatMURMUR + const ShardMycatMod + const ShardMycatPaddingMod + const ShardMycatString + const ShardRange + const ShardYear + const StatisticUser + func JSONDecode(v interface{}, data []byte) error + func JSONEncode(v interface{}) []byte + type CCConfig struct + Addr string + AdminPassword string + AdminUserName string + CoordinatorAddr string + LogFileName string + LogLevel string + LogOutput string + LogPath string + Password string + ProxyPassword string + ProxyUserName string + UserName string + func ParseCCConfig(cfgFile string) (*CCConfig, error) + func (cc *CCConfig) Verify() error + type Client interface + BasePrefix func() string + Close func() error + Create func(path string, data []byte) error + Delete func(path string) error + List func(path string) ([]string, error) + Read func(path string) ([]byte, error) + Update func(path string, data []byte) error + UpdateWithTTL func(path string, data []byte, ttl time.Duration) error + func NewClient(configType, addr, username, password string) Client + type GlobalSequence struct + DB string + PKName string + SliceName string + Table string + Type string + func (p *GlobalSequence) Encode() []byte + type Namespace struct + AllowedDBS map[string]bool + AllowedIP []string + BlackSQL []string + DefaultCharset string + DefaultCollation string + DefaultPhyDBS map[string]string + DefaultSlice string + GlobalSequences []*GlobalSequence + Name string + Online bool + ReadOnly bool + ShardRules []*Shard + Slices []*Slice + SlowSQLTime string + Users []*User + func (p *Namespace) Encode() []byte + func (p *Namespace) Verify() error + type Proxy struct + AdminAddr string + AdminPassword string + AdminUser string + ConfigType string + CoordinatorAddr string + Environ string + FileConfigPath string + LogFileName string + LogLevel string + LogOutput string + LogPath string + Password string + ProtoType string + ProxyAddr string + Service string + SessionTimeout int + SlowSQLTime int64 + StatsEnabled string + UserName string + func ParseProxyConfigFromFile(cfgFile string) (*Proxy, error) + func (p *Proxy) Verify() error + type ProxyInfo struct + AdminPort string + IP string + Pid int + ProtoType string + ProxyPort string + Pwd string + StartTime string + Sys string + Token string + func (p *ProxyInfo) Encode() []byte + type ProxyMonitorMetric struct + AdminPort string + IP string + Pid int + ProxyPort string + Pwd string + StartTime string + Sys string + Token string + func (p *ProxyMonitorMetric) Encode() []byte + type Shard struct + DB string + Databases []string + DateRange []string + HashSlice string + Key string + Locations []int + ModBegin string + ModEnd string + PadFrom string + PadLength string + ParentTable string + PartitionCount string + PartitionLength string + Seed string + Slices []string + Table string + TableRowLimit int + Type string + VirtualBucketTimes string + func (p *Shard) Encode() []byte + type Slice struct + Capacity int + IdleTimeout int + Master string + MaxCapacity int + Name string + Password string + Slaves []string + StatisticSlaves []string + UserName string + type Store struct + func NewStore(client Client) *Store + func (s *Store) Close() error + func (s *Store) CreateProxy(p *ProxyInfo) error + func (s *Store) DelNamespace(name string) error + func (s *Store) DeleteProxy(token string) error + func (s *Store) ListNamespace() ([]string, error) + func (s *Store) ListProxyMonitorMetrics() (map[string]*ProxyMonitorMetric, error) + func (s *Store) LoadNamespace(name string) (*Namespace, error) + func (s *Store) NamespaceBase() string + func (s *Store) NamespacePath(name string) string + func (s *Store) ProxyBase() string + func (s *Store) ProxyPath(token string) string + func (s *Store) UpdateNamespace(p *Namespace) error + type User struct + Namespace string + OtherProperty int + Password string + RWFlag int + RWSplit int + UserName string