xuanbo / eureka-client Goto Github PK
View Code? Open in Web Editor NEWeureka client by golang
eureka client by golang
添加一个需求,根据服务名获取注册的服务列表
func (c *Client) GetApplicationInstance(name string) []Instance {
instances := make([]Instance, 0)
c.mutex.Lock()
if c.Applications != nil {
for _, app := range c.Applications.Applications {
if app.Name == name {
instances = append(instances, app.Instances...)
}
}
}
c.mutex.Unlock()
return instances
}
Memory leaks and the number of coroutines keeps increasing,Profiling using the "pprof" tool。
`goroutine profile: total 159
71 @ 0xcdb6f6 0xceae52 0xf40075 0xd09b21
69 @ 0xcdb6f6 0xceae52 0xf3ef85 0xd09b21
[allocs abnormal display]
InstanceID: fmt.Sprintf("%s:%s:%d", ip, config.App, config.Port),
or
InstanceID: fmt.Sprintf("%s:%s:%d", config.App, ip, config.Port),
which right?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.