Struct haproxy_api::Core[][src]

pub struct Core<'lua> { /* fields omitted */ }
Expand description

The “Core” class contains all the HAProxy core functions.

Implementations

Creates new Core object using Lua global core

Returns a map of declared proxies (frontends and backends), indexed by proxy name.

Returns a map of declared proxies with backend capability, indexed by the backend name.

Returns a map of declared proxies with frontend capability, indexed by the frontend name.

Returns the executing thread number starting at 0. If thread is 0, Lua scope is shared by all threads, otherwise the scope is dedicated to a single thread. This is HAProxy 2.4 feature.

Sends a log on the default syslog server if it is configured and on the stderr if it is allowed.

Adds the ACL key in the ACLs list referenced by filename.

Deletes the ACL entry by key in the ACLs list referenced by filename.

Deletes the map entry indexed with the specified key in the list of maps referenced by his filename.

Sets the value associated to the key in the map referenced by filename.

Returns HAProxy core information (uptime, pid, memory pool usage, tasks number, …).

Returns the current time. The time returned is fixed by the HAProxy core and assures than the hour will be monotonic and that the system call gettimeofday will not be called too.

Takes a string representing http date, and returns an integer containing the corresponding date with a epoch format. A valid http date me respect the format IMF, RFC850 or ASCTIME.

Take a string representing IMF date, and returns an integer containing the corresponding date with a epoch format.

Takess a string representing RFC850 date, and returns an integer containing the corresponding date with a epoch format.

Takes a string representing ASCTIME date, and returns an integer containing the corresponding date with a epoch format.

Registers a function executed as an action. The expected actions are tcp-req, tcp-res, http-req or http-res. All the registered actions can be used in HAProxy with the prefix lua..

Registers an asynchronous function executed as an action.

Same as register_action but using Lua function.

Registers a function executed as a converter. All the registered converters can be used in HAProxy with the prefix lua..

Registers an asynchronous function executed as a converter.

Same as register_converters but using Lua function.

Registers a function executed as sample fetch. All the registered sample fetch can be used in HAProxy with the prefix lua..

Registers an asynchronous function executed as sample fetch.

Same as register_fetches but using Lua function.

Registers a Lua function executed as a service. All the registered service can be used in HAProxy with the prefix lua..

Registers a function executed after the configuration parsing. This is useful to check any parameters.

Registers and start an independent task. The task is started when the HAProxy main scheduler starts.

Registers and start an independent asynchronous task.

Same as register_task but using Lua function.

Registers a Lua function executed as a cli command.

Changes the nice of the current task or current session.

Parses ipv4 or ipv6 addresses and its facultative associated network.

Matches two networks. For example “127.0.0.1/32” matches “127.0.0.0/8”. The order of network is not important.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.