Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServiceDiscoverInterval = 5 * time.Second ActiveServerQueryURI = "/worker/v1/appgroup/getLeaderAddr" )
View Source
const GroupHasChild = 300
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupManager ¶
type GroupManager struct {
// contains filtered or unexported fields
}
func GetGroupManager ¶
func GetGroupManager() *GroupManager
func (*GroupManager) GetAppKeyByGroupId ¶
func (g *GroupManager) GetAppKeyByGroupId(groupId string) string
func (*GroupManager) GroupId2AppGroupIdMap ¶
func (g *GroupManager) GroupId2AppGroupIdMap() map[string]int64
func (*GroupManager) IsAdvancedVersion ¶ added in v0.0.2
func (g *GroupManager) IsAdvancedVersion(groupId string) bool
func (*GroupManager) StartServerDiscovery ¶
func (g *GroupManager) StartServerDiscovery(groupId, appKey string)
func (*GroupManager) Stop ¶
func (g *GroupManager) Stop()
type ServiceDiscover ¶
type ServiceDiscover struct {
// contains filtered or unexported fields
}
func GetDiscovery ¶
func GetDiscovery(groupId string) *ServiceDiscover
func NewServiceDiscovery ¶
func NewServiceDiscovery() *ServiceDiscover
func (*ServiceDiscover) ActiveServer ¶
func (s *ServiceDiscover) ActiveServer() string
func (*ServiceDiscover) ResultChangedCh ¶
func (s *ServiceDiscover) ResultChangedCh() chan struct{}
func (*ServiceDiscover) Start ¶
func (s *ServiceDiscover) Start(groupId, appKey string)
func (*ServiceDiscover) Stop ¶
func (s *ServiceDiscover) Stop(stop <-chan struct{})
type TriggerEvent ¶
Click to show internal directories.
Click to hide internal directories.