Comments (1)
Hi @beacon007, great question. The instance returned by weaver.Init
should only be used by your code in main
. Other components should not be using it. Instead, a component implementation should use itself as an instance! When you embed weaver.Implements
inside a struct, that struct inherits methods that make it implement the Instance
interface. You can see an example of one component invoking another here:
weaver/weavertest/internal/simple/simple.go
Lines 32 to 50 in dbe6df4
We'll work on improving the documentation on this. I realize the go docs don't show that weaver.Implements
implements weaver.Instance
. I'll close this issue but feel free to re-open if you have any more questions.
from weaver.
Related Issues (20)
- http: proxy error: context canceled HOT 5
- Any plan to support more languages? HOT 1
- Deploy panic because app override internal env
- Component's interface and implementation in separate packages HOT 3
- weaverAutomarshal failure HOT 2
- panic in one component caused the app to exit? HOT 6
- The parent context is not propagated to the component when deploying in "single process" mode HOT 3
- Kube support Apple Silicon M2 HOT 1
- Probably useless generics parameter HOT 1
- metrics and tracing support for gin? HOT 1
- json log handler
- feature flags
- ssh deploy and firecracker HOT 4
- Is integration with Wire possible? HOT 1
- feat: adding a Global Config Default Configuration HOT 3
- looking forward to update component interface HOT 2
- Best Practice for serving HTTP/S Traffic HOT 2
- Panic in generate when main contains os.Exit HOT 1
- https://serviceweaver.dev/examples.html broken for safari HOT 1
- The issue of errors in cross package serialization processing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weaver.