Documentation ¶
Overview ¶
Copyright 2016 The kingshard Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type ApiServer
- func (s *ApiServer) AddAllowIps(c echo.Context) error
- func (s *ApiServer) AddOneBlackSQL(c echo.Context) error
- func (s *ApiServer) AddOneSlave(c echo.Context) error
- func (s *ApiServer) ChangeMasterStatus(c echo.Context) error
- func (s *ApiServer) ChangeProxyStatus(c echo.Context) error
- func (s *ApiServer) ChangeSlaveStatus(c echo.Context) error
- func (s *ApiServer) CheckAuth(username, password string, ctx echo.Context) (bool, error)
- func (s *ApiServer) DelAllowIps(c echo.Context) error
- func (s *ApiServer) DelOneBlackSQL(c echo.Context) error
- func (s *ApiServer) DeleteOneSlave(c echo.Context) error
- func (s *ApiServer) GetAllBlackSQL(c echo.Context) error
- func (s *ApiServer) GetAllowIps(c echo.Context) error
- func (s *ApiServer) GetNodesStatus(c echo.Context) error
- func (s *ApiServer) GetProxySchema(c echo.Context) error
- func (s *ApiServer) GetProxyStatus(c echo.Context) error
- func (s *ApiServer) GetSlowLogTime(c echo.Context) error
- func (s *ApiServer) RegisterMiddleware()
- func (s *ApiServer) RegisterURL()
- func (s *ApiServer) Run() error
- func (s *ApiServer) SaveProxyConfig(c echo.Context) error
- func (s *ApiServer) SetSlowLogTime(c echo.Context) error
- func (s *ApiServer) SwitchSlowSQL(c echo.Context) error
- type DBStatus
- type ShardConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiServer ¶
type ApiServer struct {
// contains filtered or unexported fields
}
func (*ApiServer) AddAllowIps ¶
add one or multi ips
func (*ApiServer) DelAllowIps ¶
delete one or multi ips
func (*ApiServer) GetNodesStatus ¶
get nodes status
func (*ApiServer) RegisterMiddleware ¶
func (s *ApiServer) RegisterMiddleware()
func (*ApiServer) RegisterURL ¶
func (s *ApiServer) RegisterURL()
type DBStatus ¶
type DBStatus struct { Node string `json:"node"` Address string `json:"address"` Type string `json:"type"` Status string `json:"status"` LastPing string `json:"laste_ping"` MaxConn int `json:"max_conn"` IdleConn int `json:"idle_conn"` CacheConn int `json:"cache_conn"` PushConnCount int64 `json:"push_conn_count"` PopConnCount int64 `json:"pop_conn_count"` }
type ShardConfig ¶
type ShardConfig struct { User string `json:"user"` DB string `json:"db"` Table string `yaml:"table"` Key string `yaml:"key"` Nodes []string `yaml:"nodes"` Locations []int `yaml:"locations"` Type string `yaml:"type"` TableRowLimit int `yaml:"table_row_limit"` DateRange []string `yaml:"date_range"` }
range,hash or date
Click to show internal directories.
Click to hide internal directories.