Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addressable ¶
Addressable is for RPC requests to implement so that the rpc handler can extract key from the RPC request.
type Keyed ¶
type Keyed struct {
// contains filtered or unexported fields
}
Keyed is a helper that manages multiple keyed rpc objects in a common namespace
func ServeKeyed ¶
ServeKeyed returns a map containing keyed rpc objects
func ServeSingle ¶
func ServeSingle(c interface{}) *Keyed
ServeSingle returns a keyed that conforms to the net/rpc rpc call convention.
func (*Keyed) Do ¶
func (k *Keyed) Do(request Addressable, work func(resolved interface{}) error) error
Do performs work calling the work function once the request resolves to an object
func (*Keyed) Resolve ¶
func (k *Keyed) Resolve(request Addressable) (interface{}, error)
Resolve resolves input (a request object for example) that implements the Addressable interface into a plugin
Click to show internal directories.
Click to hide internal directories.