Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CheckOptions

Options used to register checks in Consul.

Hierarchy

  • CheckOptions

Index

Constructors

constructor

  • Returns CheckOptions

  • Parameters

    Returns CheckOptions

Methods

getDeregisterAfter

  • getDeregisterAfter(): string
  • Set deregister timeout. This is optional field, which is a timeout in the same time format as Interval and TTL. If a check is associated with a service and has the critical state for more than this configured value, then its associated service (and all of its associated checks) will automatically be deregistered. The minimum timeout is 1 minute, and the process that reaps critical services runs every 30 seconds, so it may take slightly longer than the configured timeout to trigger the deregistration. This should generally be configured with a timeout that's much, much longer than any expected recoverable outage for the given service.

    Returns string

getGrpc

  • getGrpc(): string
  • Specifies a gRPC check's endpoint that supports the standard gRPC health checking protocol. The state of the check will be updated at the given Interval by probing the configured endpoint. The endpoint must be represented as address:port/service

    Returns string

getHttp

  • getHttp(): string
  • Set HTTP address to check. Also you should set checking interval

    Returns string

getId

  • getId(): string
  • Set check ID

    Returns string

getInterval

  • getInterval(): string
  • Set checking interval

    Returns string

getName

  • getName(): string
  • Set check name. This is mandatory field

    Returns string

getNotes

  • getNotes(): string
  • Set check notes

    Returns string

getScriptArgs

  • getScriptArgs(): string[]
  • Set scriptArgs. Also you should set checking interval

    Returns string[]

getServiceId

  • getServiceId(): string
  • Set the service ID to associate the registered check with an existing service provided by the agent.

    Returns string

getStatus

  • Set the check status to specify the initial state of the health check.

    Returns CheckStatus

getTcp

  • getTcp(): string
  • Set TCP address to check. Also you should set checking interval

    Returns string

getTtl

  • getTtl(): string
  • Set Time to Live of check.

    Returns string

isGrpcTls

  • isGrpcTls(): boolean
  • Specifies whether to use TLS for this gRPC health check. If TLS is enabled, then by default, a valid TLS certificate is expected. Certificate verification can be turned off by setting TLSSkipVerify to true.

    Returns boolean

isTlsSkipVerify

  • isTlsSkipVerify(): boolean
  • Specifies if the certificate for an HTTPS check should not be verified.

    Returns boolean

setDeregisterAfter

  • Set deregister timeout. This is optional field, which is a timeout in the same time format as Interval and TTL. If a check is associated with a service and has the critical state for more than this configured value, then its associated service (and all of its associated checks) will automatically be deregistered. The minimum timeout is 1 minute, and the process that reaps critical services runs every 30 seconds, so it may take slightly longer than the configured timeout to trigger the deregistration. This should generally be configured with a timeout that's much, much longer than any expected recoverable outage for the given service.

    Parameters

    • deregisterAfter: string

    Returns CheckOptions

setGrpc

  • Specifies a gRPC check's endpoint that supports the standard gRPC health checking protocol. The state of the check will be updated at the given Interval by probing the configured endpoint. The endpoint must be represented as address:port/service

    Parameters

    • grpc: string

    Returns CheckOptions

setGrpcTls

  • Specifies whether to use TLS for this gRPC health check. If TLS is enabled, then by default, a valid TLS certificate is expected. Certificate verification can be turned off by setting TLSSkipVerify to true.

    Parameters

    • grpcTls: boolean

    Returns CheckOptions

setHttp

  • Set HTTP address to check. Also you should set checking interval

    Parameters

    • http: string

    Returns CheckOptions

setId

  • Set check ID

    Parameters

    • id: string

    Returns CheckOptions

setInterval

  • Set checking interval

    Parameters

    • interval: string

    Returns CheckOptions

setName

  • Set check name. This is mandatory field

    Parameters

    • name: string

    Returns CheckOptions

setNotes

  • Set check notes

    Parameters

    • notes: string

    Returns CheckOptions

setScriptArgs

  • Set scriptArgs. Also you should set checking interval

    Parameters

    • scriptArgs: string[]

    Returns CheckOptions

setServiceId

  • Set the service ID to associate the registered check with an existing service provided by the agent.

    Parameters

    • serviceId: string

    Returns CheckOptions

setStatus

  • Set the check status to specify the initial state of the health check.

    Parameters

    Returns CheckOptions

setTcp

  • Set TCP address to check. Also you should set checking interval

    Parameters

    • tcp: string

    Returns CheckOptions

setTlsSkipVerify

  • Specifies if the certificate for an HTTPS check should not be verified.

    Parameters

    • tlsSkipVerify: boolean

    Returns CheckOptions

setTtl

  • Set Time to Live of check.

    Parameters

    • ttl: string

    Returns CheckOptions

toJson

  • toJson(): {}
  • Returns {}

    • [key: string]: any

Generated using TypeDoc