API v1
Last updated
Was this helpful?
Last updated
Was this helpful?
<cluster-domain>/api/<AppQName.owner>/<AppQName.name>/<wsid>/<{q,c}.funcQName>
404, Application is not deployed
404, Application Partition is not deployed
<cluster-domain>/api/sys/router/<wsid>/c.EchoCommand
<cluster-domain>/api/sys/router/<wsid>/q.EchoQuery
Provide
requestHanlder
Command
Router
calls IBus.SendRequest2()
Create sender
Call requestHandler()
Sends sender and parameters to Processors using service channels
CP
sender is taken from service channel
IBus.SendResponse(sender, response Response)
Query
Router
Same as for Command
QP
sender is taken from service channel
var rs IResultSenderClosable = IBus.SendParallerResponse2(sender)
Use rs
struct with
IBus with httpimplRequestHandler
IHTTPProcessor
type ISender interface { SendResponse(sender interface{}) SendParallelResponse } implementation of ISender knows IBus
and sender interface{}
type RequestHandler func(requestCtx context.Context, sender ISender, request ibus.Request))
DeployApp(app istructs.AppQName, numPartitions int) (err error)
Usage: (DeployApp( DeployAppPartition | UndeployAppPartition )* UndeployApp)*-
ErrAppAlreadyDeployed
DeployAppPartition(app istructs.AppQName, partNo int, appPartitionRequestHandler RequestHandler) (err error)
ErrAppIsNotDeployed
UndeployAppPartition(app istructs.AppQName, partNo int) (err error)
ErrAppIsNotDeployed
ErrAppParitionIsNotDeployed
UndeployApp(app istructs.AppQName) (err error)
ErrActiveAppPartitionsExist
Call IBus.SendRequest2
httpimplRequestHandler
Determine App and Partition out of the Request
If AppPartition is not deployed return 404 ErrAppParitionIsNotDeployed
Call appPartitionRequestHandler
that was provided to DeployAppPartition()
sys/router
c.EchoCommand
q.EchoQuery
https://github.com/voedger/voedger/issues/1872