blob: ea58748194702500d691500b0792a867717bf102 [file] [log] [blame]
package server
import (
"veyron2/ipc"
"veyron2/security"
)
// dispatcher holds the invoker and the authorizer to be used for lookup.
type dispatcher struct {
invoker ipc.Invoker
authorizer security.Authorizer
}
// newDispatcher is a dispatcher factory.
func newDispatcher(invoker ipc.Invoker, authorizer security.Authorizer) *dispatcher {
return &dispatcher{invoker, authorizer}
}
// Lookup implements dispatcher interface Lookup.
func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
return d.invoker, d.authorizer, nil
}
// StopServing implements dispatcher StopServing.
func (*dispatcher) StopServing() {
}