HealthcheckService
in package
Uses
Configurable
Class \Firesphere\HealthcheckJobs\Services\HealthcheckService
Table of Contents
Properties
- $api_key : string
- $api_version : int
- $client : Client
- $endpoint : string
- $pingUrl : string
- $task : CronTask|QueuedJobDescriptor
- $versions : array<string|int, string>
Methods
- __construct() : mixed
- fail() : string
- getTask() : CronTask|QueuedJobDescriptor
- init() : self
- ping() : string
- setTask() : void
- start() : string
- success() : string
- Stub for success
- getCheck() : void
Properties
$api_key
protected
static string
$api_key
Management API Key to communicate with the endpoint
Tags
$api_version
protected
static int
$api_version
Tags
$client
protected
Client
$client
$endpoint
protected
static string
$endpoint
Endpoint, e.g. 'https://health.example.com'
Tags
$pingUrl
protected
string
$pingUrl
Ping endpoint on the healthcheck service
$task
protected
CronTask|QueuedJobDescriptor
$task
$versions
protected
static array<string|int, string>
$versions
= [1 => 'api/v1/checks/', 3 => 'api/v3/checks/']
Methods
__construct()
public
__construct(null|QueuedJobDescriptor $job, string $endpoint, string $key) : mixed
Parameters
- $job : null|QueuedJobDescriptor
- $endpoint : string
- $key : string
Tags
fail()
public
fail([string|null $payload = null ]) : string
Parameters
- $payload : string|null = null
Tags
Return values
stringgetTask()
public
getTask() : CronTask|QueuedJobDescriptor
Return values
CronTask|QueuedJobDescriptorinit()
public
static init(int $jobId) : self
Parameters
- $jobId : int
-
The ID of the job to ping
Tags
Return values
selfping()
public
ping([null|string $kw = null ]) : string
Parameters
- $kw : null|string = null
-
Fallback message to use when there's no last message
Tags
Return values
stringsetTask()
public
setTask(CronTask|QueuedJobDescriptor $task) : void
Parameters
- $task : CronTask|QueuedJobDescriptor
Tags
start()
public
start([string|null $kw = '' ]) : string
Parameters
- $kw : string|null = ''
Tags
Return values
stringsuccess()
Stub for success
public
success([null|string $kw = null ]) : string
Parameters
- $kw : null|string = null
Tags
Return values
stringgetCheck()
private
getCheck() : void