ClientTask

HTTP client task. It sends one HTTP GET request to the prometheus endpoint and receives a respone that should contain the expected stats, as provided in PrometheusStats.collection_text.

Constructors

this
this(IPSocket!().InetAddress srv_address)

Members

Functions

consume
size_t consume(void[] data)
run
void run()

Variables

to_report
Exception to_report;
Undocumented in source.

Inherited Members

From Task

object_pool_index
size_t object_pool_index;

Reserved index field which ensures that any Task derivative can be used with ObjectPool. That comes at minor cost of one unused size_t per Task instance if not needed which is not a problem.

fiber
WorkerFiber fiber;

Fiber this task executes in

getThis
Task getThis()
assignTo
void assignTo(WorkerFiber fiber, void delegate() entry_point)

Assigns the task to a fiber. In most cases you need to use Scheduler.schedule instead.

suspend
void suspend()

Suspends execution of this task.

resume
void resume()

Resumes execution of this task. If task has not been started yet, starts it.

terminationHook
void terminationHook(void delegate() hook)

Registers a termination hook that will be executed when the Task is killed.

removeTerminationHook
void removeTerminationHook(void delegate() hook)

Unregisters a termination hook that would be executed when the Task is killed.

suspended
bool suspended()
finished
bool finished()
kill
void kill(istring file, int line)

Forces abnormal termination for the task by throwing special exception instance.

recycle
void recycle()

Method that will be run by scheduler when task finishes. Must be overridden by specific task class to reset reusable resources.

run
void run()

Method that must be overridden in actual application/library task classes to provide entry point.

entryPoint
bool entryPoint()

Internal wrapper around this.run() which is used as primary fiber entry point and ensures any uncaught exception propagates to the context that has started this task.

Meta