SilverStripe Healthchecks

HealthcheckService 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
config

$endpoint

protected static string $endpoint

Endpoint, e.g. 'https://health.example.com'

Tags
config

$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
throws
GuzzleException

fail()

public fail([string|null $payload = null ]) : string
Parameters
$payload : string|null = null
Tags
throws
GuzzleException
Return values
string

getTask()

public getTask() : CronTask|QueuedJobDescriptor
Return values
CronTask|QueuedJobDescriptor

init()

public static init(int $jobId) : self
Parameters
$jobId : int

The ID of the job to ping

Tags
throws
GuzzleException
Return values
self

ping()

public ping([null|string $kw = null ]) : string
Parameters
$kw : null|string = null

Fallback message to use when there's no last message

Tags
throws
GuzzleException
Return values
string

setTask()

public setTask(CronTask|QueuedJobDescriptor $task) : void
Parameters
$task : CronTask|QueuedJobDescriptor
Tags
throws
GuzzleException

start()

public start([string|null $kw = '' ]) : string
Parameters
$kw : string|null = ''
Tags
throws
GuzzleException
Return values
string

success()

Stub for success

public success([null|string $kw = null ]) : string
Parameters
$kw : null|string = null
Tags
throws
GuzzleException
Return values
string

        
On this page

Search results