Plasma GitLab Archive
Projects Blog Knowledge

Module Netplex_kit


module Netplex_kit: sig .. end
Netplex toolkit

class type virtual v_processor = object .. end
Same as processor, but the methods process and supported_ptypes are flagged as virtual
class empty_processor_hooks : unit -> Netplex_types.processor_hooks
This is an empty set of processor hooks, i.e.
class processor_hooks_delegation : Netplex_types.processor_hooks -> Netplex_types.processor_hooks
Takes a hooks object, and makes a class of it.
class virtual processor_base : Netplex_types.processor_hooks -> v_processor
A virtual (incomplete) base class for processors.
class protocol_switch_processor : (string * Netplex_types.processor) list -> Netplex_types.processor
The arg is a list of pairs (proto_name, proto_proc).
class protocol_switch_factory : string -> (string * Netplex_types.processor_factory) list -> Netplex_types.processor_factory
protocol_switch_factory name merge_list: Merges the factories in merge_list to a single factory.
val add_helper_service : Netplex_types.controller -> string -> Netplex_types.processor_hooks -> unit
add_helper_service ctrl name hooks: Adds a helper service name to the controller ctrl. The helper service does not have any externally accessible socket, but starts a single regular container that looks like any other container. Whatever needs to be initialized must be done in the pre_start_hook or the post_start_hook.

This function must be called in controller context, for example in the late_initializer of Netplex_main.startup, but it can also be started later.

For an example, look at examples/netplex/helper_container.ml in the distributed source tarball.

For multi-threaded programs, Netplex_cenv.run_in_controller_context is the required companion function to start helper threads at any time. Multi-processing programs do not have such an easy way to add helpers. They should it at program startup time.

Known bug. The the helper component will be in "starting" state as long as the post_start_hook runs.

val create_protocol : ?lstn_backlog:int ->
?lstn_reuseaddr:bool ->
?so_keepalive:bool ->
?configure_slave_socket:(Unix.file_descr -> unit) ->
string -> Netplex_types.extended_address array -> Netplex_types.protocol
create_protocol name addresses: Creates a protocol object from the passed arguments
val create_socket_service_config : ?startup_timeout:float ->
?change_user_to:int * int ->
string ->
Netplex_types.protocol list ->
Netplex_types.controller_config -> Netplex_types.socket_service_config
create_socket_service_config name protos ctrl_conf: Creates a socket_service_config object from the passed arguments
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml