yeast/impl/impl.go
Gregory Eremin 8748c22d6e Keep actor private
Also this:
core/units.go:21: impl.Impl.Call is a field, not a method
2015-02-11 01:45:13 +07:00

25 lines
349 B
Go

package impl
type (
Impl struct {
actor func([]byte) ([]byte, error)
}
)
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{}
}