remove Init function from policy interface

This commit is contained in:
WhiteBatman 2017-09-26 11:02:24 +08:00 committed by Lunny Xiao
parent c618aab9e1
commit 196e520b4b
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
2 changed files with 0 additions and 3 deletions

View File

@ -62,7 +62,6 @@ func newGroup1(driverName string, dataSourceNames string, policy ...Policy) (*En
s_count: len(engines[1:]),
policy: policy[0],
}
eg.policy.Init()
return eg, nil
} else {
xPolicy := new(XormEngineGroupPolicy)
@ -91,7 +90,6 @@ func newGroup2(Master *Engine, Slaves []*Engine, policy ...Policy) (*EngineGroup
s_count: len(Slaves),
policy: policy[0],
}
eg.policy.Init()
return eg, nil
} else {
xPolicy := new(XormEngineGroupPolicy)

View File

@ -19,7 +19,6 @@ const (
)
type Policy interface {
Init()
Slave(*EngineGroup) *Engine
}