topology

package
v0.0.0-...-40bcf4c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TopoUpdate

type TopoUpdate interface {
	OnGroupChange(groupId int)
	OnSlotChange(slotId int)
}

type Topology

type Topology struct {
	ProductName string
	// contains filtered or unexported fields
}

func NewTopo

func NewTopo(ProductName string, zkAddr string, f ZkFactory) *Topology

func (*Topology) Close

func (top *Topology) Close(proxyName string)

func (*Topology) CreateProxyInfo

func (top *Topology) CreateProxyInfo(pi *models.ProxyInfo) (string, error)

func (*Topology) DoResponse

func (top *Topology) DoResponse(seq int, pi *models.ProxyInfo) error

func (*Topology) Exist

func (top *Topology) Exist(path string) (bool, error)

func (*Topology) GetActionResponsePath

func (top *Topology) GetActionResponsePath(seq int) string

func (*Topology) GetActionSeqList

func (top *Topology) GetActionSeqList(productName string) ([]int, error)

func (*Topology) GetActionWithSeq

func (top *Topology) GetActionWithSeq(seq int64) (*models.Action, error)

func (*Topology) GetActionWithSeqObject

func (top *Topology) GetActionWithSeqObject(seq int64, act *models.Action) error

func (*Topology) GetGroup

func (top *Topology) GetGroup(groupId int) (*models.ServerGroup, error)

func (*Topology) GetProxyInfo

func (top *Topology) GetProxyInfo(proxyName string) (*models.ProxyInfo, error)

func (*Topology) GetSlotByIndex

func (top *Topology) GetSlotByIndex(i int) (*models.Slot, *models.ServerGroup, error)

func (*Topology) InitZkConn

func (top *Topology) InitZkConn()

func (*Topology) IsChildrenChangedEvent

func (top *Topology) IsChildrenChangedEvent(e interface{}) bool

func (*Topology) SetProxyStatus

func (top *Topology) SetProxyStatus(proxyName string, status string) error

func (*Topology) WatchChildren

func (top *Topology) WatchChildren(path string, evtbus chan interface{}) ([]string, error)

func (*Topology) WatchNode

func (top *Topology) WatchNode(path string, evtbus chan interface{}) ([]byte, error)

type ZkFactory

type ZkFactory func(zkAddr string) (zkhelper.Conn, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL