Documentation ¶
Index ¶
- type IObjectSink
- type InvokeReplyArg
- type InvokeReplyFunc
- type MockSink
- type Node
- func (n *Node) Close() error
- func (n *Node) Id() string
- func (n *Node) InvokeRemote(methodId string, args core.Args, f InvokeReplyFunc)
- func (n *Node) LinkRemoteNode(objectId string)
- func (n Node) Registry() *Registry
- func (n *Node) SendMessage(msg core.Message)
- func (n *Node) SetOutput(out io.WriteCloser)
- func (n *Node) SetRemoteProperty(propertyId string, value core.Any)
- func (n *Node) UnlinkRemoteNode(objectId string)
- func (n *Node) Write(data []byte) (int, error)
- type Registry
- func (r *Registry) AddObjectSink(sink IObjectSink) error
- func (r *Registry) AttachClientNode(node *Node)
- func (r *Registry) DetachClientNode(node *Node)
- func (r *Registry) GetClientNode(objectId string) *Node
- func (r *Registry) Id() string
- func (r *Registry) IsRegistered(objectId string) bool
- func (r *Registry) LinkClientNode(objectId string, node *Node)
- func (r *Registry) ObjectIds() []string
- func (r *Registry) ObjectSink(objectId string) IObjectSink
- func (r *Registry) RemoveObjectSink(objectId string)
- func (r *Registry) SetSinkFactory(factory SinkFactory)
- func (r *Registry) UnlinkClientNode(objectId string)
- type SinkFactory
- type SinkToClientEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IObjectSink ¶
type InvokeReplyArg ¶
type InvokeReplyFunc ¶
type InvokeReplyFunc func(arg InvokeReplyArg)
type MockSink ¶
type MockSink struct {
// contains filtered or unexported fields
}
MockSink is an IObjectSink implementation
func NewMockSink ¶ added in v0.4.0
func (*MockSink) OnPropertyChange ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) InvokeRemote ¶
func (n *Node) InvokeRemote(methodId string, args core.Args, f InvokeReplyFunc)
func (*Node) LinkRemoteNode ¶
func (*Node) SendMessage ¶
func (*Node) SetOutput ¶
func (n *Node) SetOutput(out io.WriteCloser)
func (*Node) SetRemoteProperty ¶
func (*Node) UnlinkRemoteNode ¶
type Registry ¶
Registry is a registry of object sinks. It is used to keep track of object sinks and their associated client nodes. It is optimized for the retrieval of object sinks by object id. A sink is always associated with zero or one client node. A node can be linked to zero or many sinks.
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) AddObjectSink ¶
func (r *Registry) AddObjectSink(sink IObjectSink) error
func (*Registry) AttachClientNode ¶
attach client node to registry
func (*Registry) DetachClientNode ¶
detach client node from registry
func (*Registry) GetClientNode ¶ added in v0.4.0
func (*Registry) IsRegistered ¶ added in v0.4.0
func (*Registry) LinkClientNode ¶
func (*Registry) ObjectSink ¶
func (r *Registry) ObjectSink(objectId string) IObjectSink
get object sink by name
func (*Registry) RemoveObjectSink ¶
remove object sink from registry
func (*Registry) SetSinkFactory ¶
func (r *Registry) SetSinkFactory(factory SinkFactory)
SetSinkFactory sets the sink factory.
func (*Registry) UnlinkClientNode ¶
type SinkFactory ¶
type SinkFactory func(objectId string) IObjectSink
type SinkToClientEntry ¶
Click to show internal directories.
Click to hide internal directories.