#include "php_grpc.h"
#include "call.h"
#include "channel.h"
#include "server.h"
#include "timeval.h"
#include "version.h"
#include "channel_credentials.h"
#include "call_credentials.h"
#include "server_credentials.h"
#include "completion_queue.h"
#include <inttypes.h>
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include <ext/spl/spl_exceptions.h>
#include <zend_exceptions.h>
Go to the source code of this file.
Functions | |
void | acquire_persistent_locks () |
void | apply_ini_settings (TSRMLS_D) |
static void | custom_logger (gpr_log_func_args *args) |
void | destroy_grpc_channels () |
static | PHP_GINIT_FUNCTION (grpc) |
void | php_grpc_clean_persistent_list (TSRMLS_D) |
PHP_MINFO_FUNCTION (grpc) | |
PHP_MINIT_FUNCTION (grpc) | |
PHP_MSHUTDOWN_FUNCTION (grpc) | |
PHP_RINIT_FUNCTION (grpc) | |
void | postfork_child () |
void | postfork_parent () |
void | prefork () |
void | register_fork_handlers () |
void | release_persistent_locks () |
STD_PHP_INI_ENTRY ("grpc.enable_fork_support", "0", PHP_INI_SYSTEM, OnUpdateBool, enable_fork_support, zend_grpc_globals, grpc_globals) | |
ZEND_DECLARE_MODULE_GLOBALS (grpc) | |
Variables | |
const zend_function_entry | grpc_functions [] |
zend_module_entry | grpc_module_entry |
HashTable | grpc_persistent_list |
HashTable | grpc_target_upper_bound_map |
void acquire_persistent_locks | ( | ) |
Definition at line 123 of file php_grpc.c.
void apply_ini_settings | ( | TSRMLS_D | ) |
Definition at line 219 of file php_grpc.c.
|
static |
Definition at line 251 of file php_grpc.c.
void destroy_grpc_channels | ( | ) |
Definition at line 151 of file php_grpc.c.
|
static |
Definition at line 612 of file php_grpc.c.
void php_grpc_clean_persistent_list | ( | TSRMLS_D | ) |
Definition at line 175 of file php_grpc.c.
PHP_MINFO_FUNCTION | ( | grpc | ) |
Definition at line 584 of file php_grpc.c.
PHP_MINIT_FUNCTION | ( | grpc | ) |
everything went ok
something failed, we don't know what
this method is not available on the server
this method is not available on the client
this method must be called before invoke
this method must be called after invoke
this call is already finished (writes_done or write_status has already been called)
there is already an outstanding read/write operation on the call
the flags value was illegal for this call
Hint that the write may be buffered and need not go out on the wire immediately. GRPC is free to buffer the message until the next non-buffered write, or until writes_done, but it need not buffer completely or at all.
Force compression to be disabled for a particular write (start_write/add_metadata). Illegal on invoke/accept.
Not an error; returned on success
The operation was cancelled (typically by the caller).
Unknown error. An example of where this error may be returned is if a Status value received from another address space belongs to an error-space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error.
Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name).
Deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.
Some requested entity (e.g., file or directory) was not found.
Some entity that we attempted to create (e.g., file or directory) already exists.
The caller does not have permission to execute the specified operation. PERMISSION_DENIED must not be used for rejections caused by exhausting some resource (use RESOURCE_EXHAUSTED instead for those errors). PERMISSION_DENIED must not be used if the caller can not be identified (use UNAUTHENTICATED instead for those errors).
The request does not have valid authentication credentials for the operation.
Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
Operation was rejected because the system is not in a state required for the operation's execution. For example, directory to be deleted may be non-empty, an rmdir operation is applied to a non-directory, etc.
A litmus test that may help a service implementor in deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: (a) Use UNAVAILABLE if the client can retry just the failing call. (b) Use ABORTED if the client should retry at a higher-level (e.g., restarting a read-modify-write sequence). (c) Use FAILED_PRECONDITION if the client should not retry until the system state has been explicitly fixed. E.g., if an "rmdir" fails because the directory is non-empty, FAILED_PRECONDITION should be returned since the client should not retry unless they have first fixed up the directory by deleting files from it. (d) Use FAILED_PRECONDITION if the client performs conditional REST Get/Update/Delete on a resource and the resource on the server does not match the condition. E.g., conflicting read-modify-write on the same resource.
The operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc.
See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE.
Operation was attempted past the valid range. E.g., seeking or reading past end of file.
Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate INVALID_ARGUMENT if asked to read at an offset that is not in the range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from an offset past the current file size.
There is a fair bit of overlap between FAILED_PRECONDITION and OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error) when it applies so that callers who are iterating through a space can easily look for an OUT_OF_RANGE error to detect when they are done.
Operation is not implemented or not supported/enabled in this service.
Internal errors. Means some invariants expected by underlying system has been broken. If you see one of these errors, something is very broken.
The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.
WARNING: Although data MIGHT not have been transmitted when this status occurs, there is NOT A GUARANTEE that the server has not seen anything. So in general it is unsafe to retry on this status code if the call is non-idempotent.
See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE.
Unrecoverable data loss or corruption.
Send initial metadata: one and only one instance MUST be sent for each call, unless the call was cancelled - in which case this can be skipped. This op completes after all bytes of metadata have been accepted by outgoing flow control.
Send a message: 0 or more of these operations can occur for each call. This op completes after all bytes for the message have been accepted by outgoing flow control.
Send a close from the client: one and only one instance MUST be sent from the client, unless the call was cancelled - in which case this can be skipped. This op completes after all bytes for the call (including the close) have passed outgoing flow control.
Send status from the server: one and only one instance MUST be sent from the server unless the call was cancelled - in which case this can be skipped. This op completes after all bytes for the call (including the status) have passed outgoing flow control.
Receive initial metadata: one and only one MUST be made on the client, must not be made on the server. This op completes after all initial metadata has been read from the peer.
Receive a message: 0 or more of these operations can occur for each call. This op completes after all bytes of the received message have been read, or after a half-close has been received on this call.
Receive status on the client: one and only one must be made on the client. This operation always succeeds, meaning ops paired with this operation will also appear to succeed, even though they may not have. In that case the status will indicate some failure. This op completes after all activity on the call has completed.
Receive close on the server: one and only one must be made on the server. This op completes after the close has been received by the server. This operation always succeeds, meaning ops paired with this operation will also appear to succeed, even though they may not have.
channel is idle
channel is connecting
channel is ready for work
channel has seen a failure but expects to recover
channel has seen a failure that it cannot recover from
grpc version string
Definition at line 286 of file php_grpc.c.
PHP_MSHUTDOWN_FUNCTION | ( | grpc | ) |
Definition at line 564 of file php_grpc.c.
PHP_RINIT_FUNCTION | ( | grpc | ) |
Definition at line 595 of file php_grpc.c.
void postfork_child | ( | ) |
Definition at line 180 of file php_grpc.c.
void postfork_parent | ( | ) |
Definition at line 207 of file php_grpc.c.
void prefork | ( | ) |
Definition at line 169 of file php_grpc.c.
void register_fork_handlers | ( | ) |
Definition at line 211 of file php_grpc.c.
void release_persistent_locks | ( | ) |
Definition at line 137 of file php_grpc.c.
STD_PHP_INI_ENTRY | ( | "grpc.enable_fork_support" | , |
"0" | , | ||
PHP_INI_SYSTEM, | |||
OnUpdateBool | , | ||
enable_fork_support | , | ||
zend_grpc_globals, | |||
grpc_globals | |||
) |
Definition at line 84 of file php_grpc.c.
ZEND_DECLARE_MODULE_GLOBALS | ( | grpc | ) |
const zend_function_entry grpc_functions[] |
Definition at line 51 of file php_grpc.c.
zend_module_entry grpc_module_entry |
HashTable grpc_persistent_list |
Definition at line 45 of file php_grpc.c.
HashTable grpc_target_upper_bound_map |
Definition at line 46 of file php_grpc.c.