<%- groups ||= [] -%>
<%- common ||= false -%>
[<%= namespace %>.buffer]
type = "table"
category = "Buffer"
common = <%= common.to_toml %>
groups = <%= groups.to_toml %>
description = "Configures the sink-specific buffer behavior."

[<%= namespace %>.buffer.children.max_events]
type = "uint"
common = true
default = 500
groups = <%= groups.to_toml %>
relevant_when = {type = "memory"}
unit = "events"
description = """\
The maximum number of [events][docs.data-model] allowed in the buffer.\
"""

[<%= namespace %>.buffer.children.max_size]
type = "uint"
common = false
examples = [104900000]
groups = <%= groups.to_toml %>
relevant_when = {type = "disk"}
required = true
unit = "bytes"
description = "The maximum size of the buffer on disk."

[<%= namespace %>.buffer.children.type]
type = "string"
common = true
default = "memory"
groups = <%= groups.to_toml %>
sort = 1
description = "The buffer's type and storage mechanism."

[<%= namespace %>.buffer.children.type.enum]
memory = "Stores the sink's buffer in memory. This is more performant, but less durable. Data will be lost if Vector is restarted forcefully."
disk = "Stores the sink's buffer on disk. This is less performant, but durable. Data will not be lost between restarts."

[<%= namespace %>.buffer.children.when_full]
type = "string"
common = false
default = "block"
groups = <%= groups.to_toml %>
description = "The behavior when the buffer becomes full."

[<%= namespace %>.buffer.children.when_full.enum]
block = "Applies back pressure when the buffer is full. This prevents data loss, but will cause data to pile up on the edge."
drop_newest = "Drops new data as it is received. This data is lost. This should be used when performance is the highest priority."
