// NewMarathonFinder creates a new Marathon Finder with Marathon location func NewMarathonFinder(url string, balancer string) (Finder, error) { if len(url) == 0 { return nil, errors.New("empty marathon url for marathon application finder") } fetcher, err := fetcher.NewAppFetcher(url) if err != nil { return nil, err } return &MarathonFinder{ fetcher: fetcher, balancer: balancer, }, nil }
// NewMarathonFinder creates a new Marathon Finder with // Marathon location and load balancer name func NewMarathonFinder(url string, balancer string) (*MarathonFinder, error) { if len(url) == 0 { return nil, errors.New("empty marathon url for marathon balancer finder") } if len(balancer) == 0 { return nil, errors.New("empty balancer name for marathon balancer finder") } fetcher, err := marathon.NewAppFetcher(url) if err != nil { return nil, err } return &MarathonFinder{ fetcher: fetcher, balancer: balancer, }, nil }
// NewMarathonFinder creates a new Marathon Finder with // Marathon location and load balancer name func NewMarathonFinder(u string, b string) (Finder, error) { if len(u) == 0 { return nil, errors.New("empty marathon url for marathon application finder") } if len(b) == 0 { return nil, errors.New("empty balancer name for marathon application finder") } f, err := marathon.NewAppFetcher(u) if err != nil { return nil, err } return &MarathonFinder{ f: f, b: b, }, nil }