func NewRegistry(id, name, addr string) (*Registry, error) { rClient, err := registry.NewRegistryClient(addr, nil) if err != nil { return nil, err } return &Registry{ ID: id, Name: name, Addr: addr, registryClient: rClient, }, nil }
func NewRegistry(id, name, addr, username, password string) (*Registry, error) { rClient, err := registry.NewRegistryClient(addr, &tls.Config{InsecureSkipVerify: true}, username, password) if err != nil { return nil, err } return &Registry{ ID: id, Name: name, Addr: addr, Username: username, Password: password, registryClient: rClient, }, nil }
func getClient(c *cli.Context) (*registry.RegistryClient, error) { return registry.NewRegistryClient(c.GlobalString("url"), nil) }