<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Calling dependencies on Humus</title><link>https://z5labs.github.io/humus/dependencies/</link><description>Recent content in Calling dependencies on Humus</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://z5labs.github.io/humus/dependencies/index.xml" rel="self" type="application/rss+xml"/><item><title>Calling HTTP services</title><link>https://z5labs.github.io/humus/dependencies/http/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://z5labs.github.io/humus/dependencies/http/</guid><description>&lt;p&gt;The &lt;a href="https://pkg.go.dev/github.com/z5labs/humus/httpclient"&gt;&lt;code&gt;httpclient&lt;/code&gt;&lt;/a&gt;
package calls another service over HTTP. &lt;code&gt;httpclient.NewClient&lt;/code&gt; builds a
client for one dependency in the end user&amp;rsquo;s &lt;code&gt;Init&lt;/code&gt;, from &lt;code&gt;Settings&lt;/code&gt; the end
user sources, and returns a plain &lt;code&gt;*http.Client&lt;/code&gt;. Its calls go through the
Setup&amp;rsquo;s Host, are traced and measured with the Setup&amp;rsquo;s telemetry, are retried
when that is safe, and fail at once while a circuit breaker says the
dependency keeps failing.&lt;/p&gt;
&lt;p&gt;Service code, generated clients and SDKs take the &lt;code&gt;*http.Client&lt;/code&gt; as they
take any other, and depend on &lt;code&gt;net/http&lt;/code&gt;&amp;rsquo;s type rather than on this package,
so a unit test of that code passes any client. The client dials only
through the Setup&amp;rsquo;s Host, so a test runs the end user&amp;rsquo;s whole App, its
outbound calls included, on humustest&amp;rsquo;s network, as &lt;a href="#testing"&gt;Testing&lt;/a&gt;
shows.&lt;/p&gt;</description></item><item><title>Calling gRPC services</title><link>https://z5labs.github.io/humus/dependencies/grpc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://z5labs.github.io/humus/dependencies/grpc/</guid><description>&lt;p&gt;The &lt;a href="https://pkg.go.dev/github.com/z5labs/humus/grpc/grpcclient"&gt;&lt;code&gt;grpcclient&lt;/code&gt;&lt;/a&gt;
package calls another service over gRPC. &lt;code&gt;grpcclient.NewClient&lt;/code&gt; builds a
&lt;code&gt;Client&lt;/code&gt; for one dependency in the end user&amp;rsquo;s &lt;code&gt;Init&lt;/code&gt;, from &lt;code&gt;Settings&lt;/code&gt; the end
user sources. The &lt;code&gt;Client&lt;/code&gt; is a &lt;code&gt;grpc.ClientConnInterface&lt;/code&gt;, so generated code
takes it as it takes a &lt;code&gt;*grpc.ClientConn&lt;/code&gt;. Its calls go through the Setup&amp;rsquo;s
Host, are traced and measured with the Setup&amp;rsquo;s telemetry, are retried as the
end user&amp;rsquo;s &lt;code&gt;Classify&lt;/code&gt; decides, and fail at once while a circuit breaker says
the dependency keeps failing.&lt;/p&gt;</description></item></channel></rss>