MCPcopy
hub / github.com/eolinker/goku_lite / tran

Function tran

console/module/service/module.go:78–100  ·  view source on GitHub ↗
(v *entity.Service)

Source from the content-addressed store, hash-verified

76 return serviceDao.SetDefault(name)
77}
78func tran(v *entity.Service) *Service {
79 s := &Service{
80 Simple: Simple{
81 Name: v.Name,
82 Driver: v.Driver,
83 },
84 Desc: v.Desc,
85 IsDefault: v.IsDefault,
86 HealthCheck: v.HealthCheck,
87 UpdateTime: v.UpdateTime,
88 CreateTime: v.CreateTime,
89 }
90
91 d, has := driver2.Get(v.Driver)
92 if has {
93 s.DriverTitle = d.Title
94 s.Type = d.Type
95 } else {
96 s.DriverTitle = "unknown"
97 s.Type = "unknown"
98 }
99 return s
100}
101
102//List 获取服务发现列表
103func List(keyword string) ([]*Service, error) {

Callers 2

GetFunction · 0.85
ListFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected