<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reference Manual on Apache Dubbo</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/</link><description>Recent content in Reference Manual on Apache Dubbo</description><generator>Hugo</generator><language>en</language><atom:link href="https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/index.xml" rel="self" type="application/rss+xml"/><item><title>Ecosystem Components</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/ecology/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/ecology/</guid><description>&lt;h3 id="dubbo-go">Dubbo-go&lt;/h3>
&lt;p>&lt;a href="https://github.com/apache/dubbo-go">github.com/apache/dubbo-go&lt;/a>&lt;/p>
&lt;p>The main repository for Apache Dubbo Go language implementation&lt;/p>
&lt;h3 id="dubbo-go-samples">Dubbo-go-samples&lt;/h3>
&lt;p>&lt;a href="https://github.com/apache/dubbo-go-samples">github.com/apache/dubbo-go-samples&lt;/a>&lt;/p>
&lt;p>Usage examples of dubbo-go:&lt;/p>
&lt;ul>
&lt;li>config-api: Configuration initialization using APIs&lt;/li>
&lt;li>configcenter: Using different configuration centers, currently supporting three: zookeeper, apollo, and nacos&lt;/li>
&lt;li>context: How to use context to pass attachment&lt;/li>
&lt;li>direct: Direct connection mode&lt;/li>
&lt;li>game: Game service example&lt;/li>
&lt;li>generic: Generic invocation&lt;/li>
&lt;li>rpc: RPC invocation examples, including Triple, Dubbo, and cross-language/gRPC communication examples&lt;/li>
&lt;li>helloworld: Introduction to RPC invocation example&lt;/li>
&lt;li>logger: Logging example&lt;/li>
&lt;li>registry: Demonstrates integration with different registration centers, including zk, nacos, etcd&lt;/li>
&lt;li>metrics: Data reporting&lt;/li>
&lt;li>filter: Examples using provided filters and custom filters&lt;/li>
&lt;li>registry/servicediscovery: Application-level service discovery example&lt;/li>
&lt;li>router: Routing example&lt;/li>
&lt;li>tracing: Link tracing example&lt;/li>
&lt;/ul>
&lt;h3 id="dubbo-go-pixiu">Dubbo-go-pixiu&lt;/h3>
&lt;p>&lt;a href="https://github.com/apache/dubbo-go-pixiu">github.com/apache/dubbo-go-pixiu&lt;/a>&lt;/p></description></item><item><title>Generic Invocation</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/generic/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/generic/</guid><description>&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Deprecation Warning&lt;/h4>

 dubbo-go generic invocation is only applicable to the dubbo2 protocol, not the triple protocol

&lt;/div>

&lt;p>Generic invocation is a special way of calling in Dubbo-Go that allows intermediary nodes to pass call information without interface information, commonly used in testing and gateway scenarios. Generic invocation supports both Dubbo and Triple protocols, but currently, the serialization scheme only supports Hessian.&lt;/p>
&lt;h2 id="background">Background&lt;/h2>
&lt;p>For better understanding, this document introduces generic invocation with a gateway usage scenario. Let&amp;rsquo;s first consider a normal invocation (non-generic invocation). The diagram below includes two key roles: consumer and provider (hereinafter referred to as endpoint, representing either a consumer or a provider), each having a definition of the org.apache.dubbo.sample.User interface. Suppose the org.apache.dubbo.sample.User interface needs to be used in the calling behavior.&lt;/p></description></item><item><title>Using the dubbogo-cli Tool</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/use_dubbogo_cli/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/use_dubbogo_cli/</guid><description>&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Deprecation Warning&lt;/h4>

 Starting from version 3.1.0 of dubbo-go, this tool is no longer applicable. This tool has been discontinued and will be replaced by dubboctl in the future. Please stay updated with community news to learn about the latest developments of dubboctl.

&lt;/div>

&lt;h2 id="1-installation">1. Installation&lt;/h2>
&lt;p>dubbogo-cli is a subproject of the Apache/dubbo-go ecosystem, providing convenient application template creation, tool installation, interface debugging, and other functions to improve developer efficiency.&lt;/p>
&lt;p>To install dubbogo-cli to $GOPATH/bin, run the following command:&lt;/p></description></item><item><title>Using Nacos as a Registry</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/nacos/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/mannual/golang-sdk/refer/nacos/</guid><description>&lt;h2 id="1-preparation">1. Preparation&lt;/h2>
&lt;ul>
&lt;li>The dubbo-go CLI tool and dependencies are installed&lt;/li>
&lt;li>Create a new demo application&lt;/li>
&lt;/ul>
&lt;h2 id="2-using-grpc_cli-tool-for-dubbo-service-debugging">2. Using grpc_cli Tool for Dubbo Service Debugging&lt;/h2>
&lt;h3 id="21-start-the-server">2.1 Start the Server&lt;/h3>
&lt;p>Example: user.go:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">func&lt;/span> (u &lt;span style="color:#719e07">*&lt;/span>UserProvider) &lt;span style="color:#268bd2">GetUser&lt;/span>(ctx context.Context, userStruct &lt;span style="color:#719e07">*&lt;/span>CallUserStruct) (&lt;span style="color:#719e07">*&lt;/span>User, &lt;span style="color:#dc322f">error&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	fmt.&lt;span style="color:#268bd2">Printf&lt;/span>(&lt;span style="color:#2aa198">&amp;#34;=======================\nreq:%#v\n&amp;#34;&lt;/span>, userStruct)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	rsp &lt;span style="color:#719e07">:=&lt;/span> User{&lt;span style="color:#2aa198">&amp;#34;A002&amp;#34;&lt;/span>, &lt;span style="color:#2aa198">&amp;#34;Alex Stocks&amp;#34;&lt;/span>, &lt;span style="color:#2aa198">18&lt;/span>, userStruct.SubInfo}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	fmt.&lt;span style="color:#268bd2">Printf&lt;/span>(&lt;span style="color:#2aa198">&amp;#34;=======================\nrsp:%#v\n&amp;#34;&lt;/span>, rsp)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	&lt;span style="color:#719e07">return&lt;/span> &lt;span style="color:#719e07">&amp;amp;&lt;/span>rsp, &lt;span style="color:#cb4b16">nil&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The server exposes a service named GetUser, taking a CallUserStruct parameter and returning a User parameter.&lt;br>
Definition of CallUserStruct parameter:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">type&lt;/span> CallUserStruct &lt;span style="color:#268bd2">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	ID &lt;span style="color:#dc322f">string&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	Male &lt;span style="color:#dc322f">bool&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	SubInfo SubInfo &lt;span style="color:#586e75">// Nested substructure
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">func&lt;/span> (cs CallUserStruct) &lt;span style="color:#268bd2">JavaClassName&lt;/span>() &lt;span style="color:#dc322f">string&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	&lt;span style="color:#719e07">return&lt;/span> &lt;span style="color:#2aa198">&amp;#34;com.ikurento.user.CallUserStruct&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">type&lt;/span> SubInfo &lt;span style="color:#268bd2">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	SubID &lt;span style="color:#dc322f">string&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	SubMale &lt;span style="color:#dc322f">bool&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	SubAge &lt;span style="color:#dc322f">int&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">func&lt;/span> (s SubInfo) &lt;span style="color:#268bd2">JavaClassName&lt;/span>() &lt;span style="color:#dc322f">string&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	&lt;span style="color:#719e07">return&lt;/span> &lt;span style="color:#2aa198">&amp;#34;com.ikurento.user.SubInfo&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Definition of User structure:&lt;/p></description></item></channel></rss>