| "veyron2/services/mgmt/content" |
| // dispatcher holds the state of the content manager dispatcher. |
| // newDispatcher is the dispatcher factory. |
| func NewDispatcher(root string, depth int, authorizer security.Authorizer) *dispatcher { |
| return &dispatcher{root: root, auth: authorizer} |
| // DISPATCHER INTERFACE IMPLEMENTATION |
| func (d *dispatcher) Lookup(suffix string) (ipc.Invoker, security.Authorizer, error) { |
| invoker := ipc.ReflectInvoker(content.NewServerRepository(newInvoker(d.root, d.depth, &d.fs, suffix))) |
| return invoker, d.auth, nil |