MCPcopy Create free account
hub / github.com/TalkingData/owl / GetGroupsByStrategyID

Method GetGroupsByStrategyID

controller/mysql.go:72–79  ·  view source on GitHub ↗
(strategy_id int)

Source from the content-addressed store, hash-verified

70}
71
72func (this *db) GetGroupsByStrategyID(strategy_id int) []*types.Group {
73 groups := []*types.Group{}
74 if err := this.Select(&groups, "SELECT `id`, `name` FROM `host_group` WHERE `id` IN (SELECT `group_id` FROM `strategy_group` WHERE `strategy_id`=?)", strategy_id); err != nil {
75 lg.Error(err.Error())
76 return nil
77 }
78 return groups
79}
80
81func (this *db) GetHostsByGroupID(group_id int) []*types.Host {
82 hosts := []*types.Host{}

Callers 1

processSingleStrategyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected