Documentation ¶
Overview ¶
Package pong contains the implementation of the PingPong service.
The file ping_stub_gen.go is generated with:
$ qiloop stub --idl ping.qi.idl --output ping_stub_gen.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PingPongObject ¶
func PingPongObject(impl PingPongImplementor) bus.Actor
PingPongObject returns an object using PingPongImplementor
Types ¶
type PingPongImplementor ¶
type PingPongImplementor interface { // Activate is called before any other method. // It shall be used to initialize the interface. // activation provides runtime informations. // activation.Terminate() unregisters the object. // activation.Session can access other services. // helper enables signals and properties updates. // Properties must be initialized using helper, // during the Activate call. Activate(activation bus.Activation, helper PingPongSignalHelper) error OnTerminate() Hello(a string) (string, error) Ping(a string) error }
PingPongImplementor interface of the service implementation
func PingPongImpl ¶
func PingPongImpl() PingPongImplementor
PingPongImpl returns an implementation of ping pong.
type PingPongProxy ¶
type PingPongProxy interface { Hello(a string) (string, error) Ping(a string) error SubscribePong() (unsubscribe func(), updates chan string, err error) // Generic methods shared by all objectsProxy bus.ObjectProxy // WithContext can be used cancellation and timeout WithContext(ctx context.Context) PingPongProxy }
PingPongProxy represents a proxy object to the service
func CreatePingPong ¶
func CreatePingPong(session bus.Session, service bus.Service, impl PingPongImplementor) (PingPongProxy, error)
CreatePingPong registers a new object to a service and returns a proxy to the newly created object
func MakePingPong ¶
func MakePingPong(sess bus.Session, proxy bus.Proxy) PingPongProxy
MakePingPong returns a specialized proxy.
type PingPongSignalHelper ¶
PingPongSignalHelper provided to PingPong a companion object
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
client
Package main illustrate how to interract with the PingPong service.
|
Package main illustrate how to interract with the PingPong service. |
service
Package main illustrate how to use the pong package to create a service "PingPong" registered to the service directory.
|
Package main illustrate how to use the pong package to create a service "PingPong" registered to the service directory. |
Click to show internal directories.
Click to hide internal directories.