haproxy/include/proto
Willy Tarreau 67b5a161b4 MINOR: sink: create definitions a minimal code for event sinks
The principle will be to be able to dispatch events to various destinations
called "sinks". This is already done in part in logs where log servers can
be either a UDP socket or a file descriptor. This will be needed with the
new trace subsystem where we may also want to add ring buffers. And it turns
out that all such destinations make sense at all places. Logs may need to be
sent to a TCP server via a ring buffer, or consulted from the CLI. Trace
events may need to be sent to stdout/stderr as well as to remote log servers.

This patch creates a new structure "sink" aiming at addressing these similar
needs. The goal is to merge together what is common to all of them, such as
the output format, the dropped events count, etc, and also keep separately
the target identification (network address, file descriptor). Provisions
were made to have a "waiter" on the sink. For a TCP log server it will be
the task to wake up after writing to the log buffer. For a ring buffer, it
could be the list of watchers on the CLI running a "tail" operation and
waiting for new events. A lock was also placed in the struct since many
operations will require some locking, including the FD ones. The output
formats covers those in use by logs and two extra ones prepending the ISO
time in front of the message (convenient for stdio/buffer).

For now only the generic infrastructure is present, no type-specific
output is implemented. There's the sink_write() function which prepares
and formats a message to be sent, trying hard to avoid copies and only
using pointer manipulation, where the type-specific code just has to be
added. Dropped messages are already counted (for now 100% drop). The
message is put into an iovec array as it will be trivial to use with
file descriptors and sockets.
2019-08-22 20:21:00 +02:00
..
acl.h
action.h
activity.h MINOR: time: move the cpu, mono, and idle time to thread_info 2019-05-20 21:14:14 +02:00
applet.h MINOR: applet: make appctx use their own pool 2019-07-18 10:45:08 +02:00
arg.h
auth.h
backend.h MAJOR: stream: store the target address into s->target_addr 2019-07-19 13:50:09 +02:00
channel.h BUG/MEDIUM: stream-int: Don't rely on CF_WRITE_PARTIAL to unblock opposite si 2019-07-05 14:26:15 +02:00
checks.h
cli.h MINOR: cli: add cli_msg(), cli_err(), cli_dynmsg(), cli_dynerr() 2019-08-09 10:11:38 +02:00
compression.h
connection.h MAJOR: connection: remove the addr field 2019-07-19 13:50:09 +02:00
dict.h MINOR: dict: Add dictionary new data structure. 2019-06-05 08:33:35 +02:00
dns.h
fd.h MINOR: fd: make sure to mark the thread as not stuck in fd_update_events() 2019-08-16 16:06:14 +02:00
filters.h REORG: proto_htx: Move HTX analyzers & co to http_ana.{c,h} files 2019-07-19 09:24:12 +02:00
flt_http_comp.h
freq_ctr.h OPTIM: freq-ctr: don't take the date lock for most updates 2019-05-25 20:31:53 +02:00
frontend.h
hlua.h MINOR: lua: export applet and task handlers 2019-08-21 14:32:09 +02:00
hlua_fcn.h
http_ana.h REORG: proto_htx: Move HTX analyzers & co to http_ana.{c,h} files 2019-07-19 09:24:12 +02:00
http_fetch.h MEDIUM: http_fetch: Remove code relying on HTTP legacy mode 2019-07-19 09:18:27 +02:00
http_htx.h BUG/MINOR: http_htx: Support empty errorfiles 2019-07-23 14:58:32 +02:00
http_rules.h
lb_chash.h
lb_fas.h
lb_fwlc.h
lb_fwrr.h
lb_map.h
listener.h
log.h
map.h
mux_pt.h
mworker.h BUG/MINOR: mworker: Fix memory leak of mworker_proc members 2019-05-22 11:29:18 +02:00
obj_type.h CLEANUP: objtype: make obj_type() and obj_type_name() take consts 2019-05-22 11:50:48 +02:00
pattern.h
payload.h
peers.h MINOR: peers: Make peers protocol support new "server_name" data type. 2019-06-05 08:42:33 +02:00
pipe.h
port_range.h
proto_sockpair.h
proto_tcp.h
proto_udp.h
protocol.h BUG/MEDIUM: protocols: add a global lock for the init/deinit stuff 2019-07-24 16:45:02 +02:00
protocol_buffers.h
proxy.h BUG/MEDIUM: stick-table: Wrong stick-table backends parsing. 2019-08-07 10:32:31 +02:00
queue.h
raw_sock.h
sample.h
server.h BUG/MINOR: server: Be really able to keep "pool-max-conn" idle connections 2019-07-10 14:20:52 +02:00
session.h BUG/MEDIUM: sessions: Don't keep an extra idle connection in sessions. 2019-07-04 14:28:18 +02:00
shctx.h
signal.h
sink.h MINOR: sink: create definitions a minimal code for event sinks 2019-08-22 20:21:00 +02:00
spoe.h BUG/MEDIUM: spoe: Be sure the sample is found before setting its context 2019-05-07 22:16:41 +02:00
ssl_sock.h MINOR: ssl: Make ssl_sock_handshake() static. 2019-06-05 18:03:38 +02:00
stats.h
stick_table.h MINOR: stick-table: Add "server_name" new data type. 2019-06-05 08:33:35 +02:00
stream.h BUG/MEDIUM: streams: Don't redispatch with L7 retries if redispatch isn't set. 2019-07-12 16:17:50 +02:00
stream_interface.h MINOR: backend: switch to conn_get_{src,dst}() for port and address mapping 2019-07-19 13:50:09 +02:00
task.h MINOR: task: introduce work lists 2019-07-12 09:07:48 +02:00
tcp_rules.h
template.h
vars.h