HttpEndpointResolver
in package
implements
HttpEndpointResolverInterface
Resolves non-signal-specific OTLP HTTP endpoints to signal-specific ones according to the specification.
Tags
Table of Contents
Interfaces
Constants
- DEFAULT_SCHEME = 'https'
- HOST_ATTRIBUTE = 'host'
- PASS_ATTRIBUTE = 'pass'
- PATH_ATTRIBUTE = 'path'
- PORT_ATTRIBUTE = 'port'
- ROOT_PATH = '/'
- SCHEME_ATTRIBUTE = 'scheme'
- USER_ATTRIBUTE = 'user'
Properties
Methods
- __construct() : mixed
- create() : self
- resolve() : UriInterface
- resolveToString() : string
- addPort() : UriInterface
- addUserInfo() : UriInterface
- createDefaultUri() : UriInterface
- createUri() : UriInterface
- getDefaultPath() : string
- parseEndpoint() : array<string|int, mixed>
- resolvePath() : string
- validateScheme() : void
- validateSignal() : void
Constants
DEFAULT_SCHEME
private
mixed
DEFAULT_SCHEME
= 'https'
HOST_ATTRIBUTE
private
mixed
HOST_ATTRIBUTE
= 'host'
PASS_ATTRIBUTE
private
mixed
PASS_ATTRIBUTE
= 'pass'
PATH_ATTRIBUTE
private
mixed
PATH_ATTRIBUTE
= 'path'
PORT_ATTRIBUTE
private
mixed
PORT_ATTRIBUTE
= 'port'
ROOT_PATH
private
mixed
ROOT_PATH
= '/'
SCHEME_ATTRIBUTE
private
mixed
SCHEME_ATTRIBUTE
= 'scheme'
USER_ATTRIBUTE
private
mixed
USER_ATTRIBUTE
= 'user'
Properties
$httpFactoryResolver read-only
private
FactoryResolverInterface
$httpFactoryResolver
Methods
__construct()
public
__construct([FactoryResolverInterface|null $httpFactoryResolver = null ]) : mixed
Parameters
- $httpFactoryResolver : FactoryResolverInterface|null = null
create()
public
static create([FactoryResolverInterface|null $httpFactoryResolver = null ]) : self
Parameters
- $httpFactoryResolver : FactoryResolverInterface|null = null
Return values
selfresolve()
public
resolve(string $endpoint, string $signal) : UriInterface
Parameters
- $endpoint : string
- $signal : string
Return values
UriInterfaceresolveToString()
public
resolveToString(string $endpoint, string $signal) : string
Parameters
- $endpoint : string
- $signal : string
Return values
stringaddPort()
private
static addPort(UriInterface $uri, array<string|int, mixed> $components) : UriInterface
Parameters
- $uri : UriInterface
- $components : array<string|int, mixed>
Return values
UriInterfaceaddUserInfo()
private
static addUserInfo(UriInterface $uri, array<string|int, mixed> $components) : UriInterface
Parameters
- $uri : UriInterface
- $components : array<string|int, mixed>
Return values
UriInterfacecreateDefaultUri()
private
createDefaultUri(array<string|int, mixed> $components, string $signal) : UriInterface
Parameters
- $components : array<string|int, mixed>
- $signal : string
Return values
UriInterfacecreateUri()
private
createUri() : UriInterface
Return values
UriInterfacegetDefaultPath()
private
static getDefaultPath(string $signal) : string
Parameters
- $signal : string
Return values
stringparseEndpoint()
private
static parseEndpoint(string $endpoint) : array<string|int, mixed>
Parameters
- $endpoint : string
Return values
array<string|int, mixed>resolvePath()
private
static resolvePath(string $path, string $signal) : string
Parameters
- $path : string
- $signal : string
Return values
stringvalidateScheme()
private
static validateScheme(string $protocol) : void
Parameters
- $protocol : string
validateSignal()
private
static validateSignal(string $signal) : void
Parameters
- $signal : string