Documentation ¶
Index ¶
- type Topo
- func (t *Topo) AddGroupNode(groupID int, addr string, tp string, status string, weight int) (string, error)
- func (t *Topo) AddSchemaGroup(db string, groupID int) error
- func (t *Topo) Close()
- func (t *Topo) CreateAgent(nodeAddr string) (string, error)
- func (t *Topo) CreateGroup(groupID int) (string, error)
- func (t *Topo) CreateProxy(p *model.Proxy) (string, error)
- func (t *Topo) CreateSchema(db string, groupIDs []int, defaultGroupID int) (string, error)
- func (t *Topo) DeleteAgent(nodeAddr string) error
- func (t *Topo) DeleteGroup(groupID int) error
- func (t *Topo) DeleteGroupNode(groupID int, addr string) error
- func (t *Topo) DeleteProxy(addr string) error
- func (t *Topo) DeleteSchema(db string) error
- func (t *Topo) DeleteSchemaGroup(db string, groupID int) error
- func (t *Topo) GetAgentBasePath() string
- func (t *Topo) GetGroup(groupID int) (*model.Group, error)
- func (t *Topo) GetGroupBasePath() string
- func (t *Topo) GetGroupNode(groupID int, addr string) (*model.Node, error)
- func (t *Topo) GetGroupNodePath(groupID int, addr string) string
- func (t *Topo) GetGroupPath(groupID int) string
- func (t *Topo) GetProxy(addr string) (*model.Proxy, error)
- func (t *Topo) GetProxyBasePath() string
- func (t *Topo) GetSchema(db string) (*model.Schema, error)
- func (t *Topo) GetSchemaBasePath() string
- func (t *Topo) GetSchemaPath(db string) string
- func (t *Topo) GetSchemaTablePath(db string, table string) string
- func (t *Topo) ListAgents() ([]string, error)
- func (t *Topo) ListProxys() ([]*model.Proxy, error)
- func (t *Topo) SetGroupNodeStatus(groupID int, addr string, status string) error
- func (t *Topo) SetGroupNodeWeight(groupID int, addr string, weight int) error
- func (t *Topo) SetGroupStatus(groupID int, status string) error
- func (t *Topo) SetProxyStatus(addr string, status string) error
- func (t *Topo) UpdateSchemaDefaultGroup(db string, defaultGroupID int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Topo ¶
type Topo struct { // for the base zk directory name Name string // contains filtered or unexported fields }
We use zookeeper to store the configuration and cooperate all services
func (*Topo) AddGroupNode ¶
func (*Topo) CreateSchema ¶
func (*Topo) DeleteAgent ¶
func (*Topo) DeleteGroup ¶
func (*Topo) DeleteProxy ¶
func (*Topo) DeleteSchema ¶
func (*Topo) GetGroupBasePath ¶
func (*Topo) GetGroupNode ¶
func (*Topo) GetGroupPath ¶
func (*Topo) GetProxyBasePath ¶
func (*Topo) GetSchemaBasePath ¶
func (*Topo) GetSchemaPath ¶
func (*Topo) ListAgents ¶
func (*Topo) SetGroupNodeStatus ¶
func (*Topo) SetGroupNodeWeight ¶
Click to show internal directories.
Click to hide internal directories.