INNER CODE UNIT · Go

buildSvc

yarpc/yarpc-go · encoding/thrift/thriftrw-plugin-yarpc/main.go:203

func buildSvc(serviceID api.ServiceID, req *api.GenerateServiceRequest) *Svc {
	service := req.Services[serviceID]
	module := req.Modules[service.ModuleID]

	var parents []*Svc
	if service.ParentID != nil {
		parentSvc := buildSvc(*service.ParentID, req)
		parents = append(parents, parentSvc)
		parents = append(parents, parentSvc.Parents...)
	}

	return &Svc{
		Service: service,
		Module:  module,
		Parents: parents,
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…