1
0
Fork 0
yeast/impl/impl.go

25 lines
349 B
Go
Raw Normal View History

2015-02-10 18:23:58 +00:00
package impl
type (
Impl struct {
actor func([]byte) ([]byte, error)
2015-02-10 18:23:58 +00:00
}
)
func New(name string) *Impl {
switch name {
case "units.throttler.Throttler":
return Throttler()
default:
return nil
}
}
func (i *Impl) Call(data []byte) (resp []byte, err error) {
return i.actor(data)
}
func (i *Impl) Units() []string {
return []string{}
}