Bloodhound – base actors
Type: Proxy
RequestActor
This is a special actor and needs to be instantiated with the special id proxy/request
class: com.apifortress.afthem.actors.proxy.RequestActor
sidecars: yes
config:
discard_headers
: a list of request header names that need to be discarded immediately
UpstreamHttpActor
The default upstream actor.
class: com.apifortress.afthem.actors.proxy.UpstreamHttpActor
sidcars: yes
config:
connect_timeout
: timeout for the connection process in millisecondssocket_timeout
: timeout for silent socket in millisecondsredirects_enabled
: set to true if you want Bloodhound to resolve redirects instead of forwarding to the clientmax_redirects
: if redirects are enabled, maximum number of redirects before giving updiscard_headers
: a list of response header names that need to be discarded immediately
UpstreamFileActor
An upstream actor that pulls content from text files.
class: com.apifortress.afthem.actors.proxy.UpstreamFileActor
sidecars: yes
config:
basepath
: path to the files directory. The file name needs to be provided in the request url
SendBackActor
An actor taking care of performing the final checks, packaging and sending back the content.
class: com.apifortress.afthem.actors.proxy.SendBackActor
sidecars: yes
Type: Sidecar
AccessLoggerActor
A logger actor meant to log both inbound and outbound calls. The behavior of the logging activity is managed by the etc/logback.xml
file.
class: com.apifortress.afthem.actors.sidecars.AccessLoggerActor
sidecars: no
GenericLoggerActor
A logger to be used in a flow to log certain facts, determined by the user. The behavior of the logging activity is managed by the etc/logback.xml
file.
class: com.apifortress.afthem.actors.sidecars.GenericLoggerActor
sidecars: no
config:
value
: the content to be loggedevaluated
: if set to true, thevalue
field will be interpreted as a SpEL script. The message is accessible via themsg
variable.
FileAppenderSerializerActor
Serializes a full API conversation to JSON and appends it to a file.
class: com.apifortress.afthem.actors.sidecars.serializers.FileAppenderSerializerActor
sidecars: no
config:
filename
: name of the filedisable_on_header
: if the provided header is present in the request, then the conversation will skip serializationenable_on_header
: if the provided header is present in the request, then the conversation will be serializeddiscard_request_headers
: list of request headers that should not appear in the serialized conversationdiscard_response_headers
: list of response headers that should not appear in the serialized conversationallow_content_types
: full or partial response content types which make the request eligible for serialization. If the list is null or empty, all content types will be accepted
Type: Transformer
TransformHeadersActor
Alters the headers of a message. If the transformer is placed before an Upstream actor, it modifies the request headers. If after, it modifies the response headers.
class: com.apifortress.afthem.actors.transformers.TransformHeadersActor
config:
add
: adds a header. Ifevaluated
is set toŧrue
, the value is treated as a SpEL script. Example:add: - name: header_name value: header_value evaluated: false
remove
: removes a header. Example:remove: - name: header_name
set
: sets the value of an existing header, or adds it if the header is not present. Ifevaluated
is set toŧrue
, the value is treated as a SpEL script. Example:set: - name: header_name value: header_value evaluated: false
Type: Filter
FilterActor
Filters out any request not matching a certain set of criteria.
class: com.apifortress.afthem.actors.filters.FilterActor
sidecars: yes
config:
accept
: a list of conditions. If verified, the message will be accepted. Example:Just like previous filters, if evaluated is true,accept: - value: "#msg.request().getHeader('accept')=='application/json'" evaluated: true - value: "#msg.request().getHeader('key')=='ABC123'" evaluated: true
value
will be evaluated as SpEL script.reject
: a list of conditions. If verified, the message will be rejected. Example:reject: - value: "#msg.request().method()!='GET'" evaluated: true