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

Method GetHostsExByStrategyID

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

Source from the content-addressed store, hash-verified

57}
58
59func (this *db) GetHostsExByStrategyID(strategy_id int) map[string]string {
60 ids := make([]string, 0)
61 if err := this.Select(&ids, "SELECT host_id FROM strategy_host_exclude WHERE strategy_id=?", strategy_id); err != nil {
62 lg.Error(err.Error())
63 return nil
64 }
65 exHosts := make(map[string]string, 0)
66 for _, id := range ids {
67 exHosts[id] = id
68 }
69 return exHosts
70}
71
72func (this *db) GetGroupsByStrategyID(strategy_id int) []*types.Group {
73 groups := []*types.Group{}

Callers 1

processSingleStrategyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected