Fix some issues with initialisation

This commit is contained in:
Asim
2016-01-04 23:07:56 +00:00
parent 9ecbf0d71b
commit 897115ed31
7 changed files with 61 additions and 0 deletions

View File

@@ -56,6 +56,17 @@ func (r *blackListSelector) run() {
}
}
func (r *blackListSelector) Init(opts ...selector.Option) error {
for _, o := range opts {
o(&r.so)
}
return nil
}
func (r *blackListSelector) Options() selector.Options {
return r.so
}
func (r *blackListSelector) Select(service string, opts ...selector.SelectOption) (selector.Next, error) {
var sopts selector.SelectOptions
for _, opt := range opts {