Documentation ¶
Index ¶
- Variables
- func ServeRPC(hub *chronomq.Hub, addr string) (io.Closer, error)
- type RPCServer
- func (r *RPCServer) Cancel(id string, ignoredReply *int8) error
- func (r *RPCServer) InspectN(n int, rpcJobs *[]*api.Job) error
- func (r *RPCServer) Next(timeout time.Duration, job *api.Job) error
- func (r *RPCServer) Ping(ignore int8, pong *string) error
- func (r *RPCServer) PutWithID(rpcJob api.Job, id *string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeout = errors.New("No new jobs available in given timeout")
ErrTimeout indicates that no new jobs were ready to be consumed within the given timeout duration
Functions ¶
Types ¶
type RPCServer ¶ added in v1.3.0
type RPCServer struct {
// contains filtered or unexported fields
}
RPCServer exposes a Chronomq hub backed RPC endpoint
func (*RPCServer) Cancel ¶ added in v1.3.0
Cancel deletes the job pointed to by the id, reply is ignored If the job doesn't exist, no error is returned so calls to Cancel are idempotent
func (*RPCServer) InspectN ¶ added in v1.3.0
InspectN returns n jobs without removing them for ad-hoc inspection
func (*RPCServer) Next ¶ added in v1.3.0
Next sets the reply (job) to a valid job if a job is ready to be triggered If not job is ready yet, this call will wait (block) for the given duration and keep searching for ready jobs. If no job is ready by the end of the timeout, ErrTimeout is returned
Click to show internal directories.
Click to hide internal directories.