| 1234567891011121314151617 |
- package server
- import (
- "git.ikuban.com/server/kratos-nacos/registry"
- "github.com/go-kratos/kratos-layout/internal/conf"
- )
- func NewRegistrar(c *conf.Bootstrap) *registry.Registry {
- if c.Server.Registrar.Group != "" {
- r, err := registry.New(c.Server.Registrar.Endpoint, c.Server.Registrar.Namespace, registry.Group(c.Server.Registrar.Group))
- if err != nil {
- panic(err)
- }
- return r
- }
- return nil
- }
|