GrpcTransportFactory
in package
implements
TransportFactoryInterface
uses
LogsMessagesTrait
FinalYes
Table of Contents
Interfaces
Methods
- create() : TransportInterface
- logDebug() : void
- logError() : void
- logInfo() : void
- logNotice() : void
- logWarning() : void
- createOpts() : array<string|int, mixed>
- doLog() : void
- fileGetContents() : string|null
- shouldLog() : bool
Methods
create()
public
create(string $endpoint[, string $contentType = ContentTypes::PROTOBUF ][, array<string|int, mixed> $headers = [] ][, mixed $compression = null ][, float $timeout = 10.0 ][, int $retryDelay = 100 ][, int $maxRetries = 3 ][, string|null $cacert = null ][, string|null $cert = null ][, string|null $key = null ]) : TransportInterface
Parameters
- $endpoint : string
- $contentType : string = ContentTypes::PROTOBUF
- $headers : array<string|int, mixed> = []
- $compression : mixed = null
- $timeout : float = 10.0
- $retryDelay : int = 100
- $maxRetries : int = 3
- $cacert : string|null = null
- $cert : string|null = null
- $key : string|null = null
Tags
Return values
TransportInterfacelogDebug()
protected
static logDebug(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logError()
protected
static logError(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logInfo()
protected
static logInfo(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logNotice()
protected
static logNotice(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logWarning()
protected
static logWarning(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
createOpts()
private
static createOpts(mixed $compression, float $timeout, int $maxRetries, int $retryDelay) : array<string|int, mixed>
Parameters
- $compression : mixed
- $timeout : float
- $maxRetries : int
- $retryDelay : int
Return values
array<string|int, mixed>doLog()
private
static doLog(string $level, string $message, array<string|int, mixed> $context) : void
Parameters
- $level : string
- $message : string
- $context : array<string|int, mixed>
fileGetContents()
private
static fileGetContents(string|null $file) : string|null
Parameters
- $file : string|null
Return values
string|nullshouldLog()
private
static shouldLog(string $level) : bool
Parameters
- $level : string