Repository navigation
sdk-elixir-v0.3.0
·
226 commits
to main
since this release
Added
Ankusa.SDK.Receiver, aPlugforAnkusa.Sink.Httpdeliveries: it reads
the raw body, parses thex-ankusa-*headers, calls the configured
Ankusa.SDK.Handler, and answers202/503/400/413the way the
dispatcher's retry expects. Options::handler,:path,:max_body_bytes.Ankusa.SDK.Hook, the one value a handler sees whichever transport delivered
it, andAnkusa.SDK.Handler, the behaviour it implements.Ankusa.SDK.Webhook.parse_headers/1for receivers built on something other
than the Plug, plusAnkusa.SDK.MissingHookIdErrorwhenx-ankusa-idis
absent or empty.Ankusa.SDK.Message, theAnkusa.Sink.Messagewire format shared by the
queue sinks:decode/1with an exact reason for every malformed message, and
to_hook/2, which redeems the claim check when the payload rode one.
Ankusa.SDK.InvalidMessageErrorclassifies undecodable bytes.Ankusa.SDK.ClaimCheck(redeem/3,health/1) with the end-to-end sha256
check the gateway does not run, andAnkusa.SDK.ClaimRef.parse/1on its own.
The error hierarchy carriesretryableso a consumer needs one bit to pick
dead-letter or retry:InvalidClaimRefError,ClaimNotFoundError,
ClaimRejectedError,ClaimIntegrityError,ClaimCheckUnavailableError.Ankusa.SDK.Routes:health,list_routes,create_route,get_route,
replace_route,update_route,delete_route,get_ip_rules,
put_ip_rules,test_route, withInvalidRouteIdError,
RouteNotFoundError,RoutesRejectedError,RoutesUnavailableError.Ankusa.SDK.Admin:health,metrics,config,list_dead_letters,
replay_dead_letters,list_quarantined, withRoleNotEnabledError,
AdminRejectedError,AdminUnavailableError.Ankusa.SDK.Sources:verify_version,server_version,list_sources,
get_source,create_source,update_source,delete_source, plus
Ankusa.SDK.Sources.Spec(the writable spec) andAnkusa.SDK.Sources.Source
(a stored, redacted source).- Every client takes
:headers,:timeout_ms(default 10 s) and:req_options
(:finch,:connect_options,:pool_timeout,:plug). One request per
call, no retries, and a redirect is never followed: a3xxis an
*UnavailableError. With a:finchpool,timeout_msbounds the response
only, since the pool owns its connect options. - The language-neutral conformance runner
(test/conformance_test.exs), passing every vector inconformance/cases.