// New returns a new Bee instance configured with the supplied options.
197556
func (factory *SimplepushBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := SimplepushBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
206319
func New(exec utilexec.Interface, dbus utildbus.Interface, protocol Protocol) Interface {
	return newInternal(exec, dbus, protocol, "")
}
18115
func New(config *Config) (*Kubernetes, error) {
	var err error

	if config == nil {
		config = &Config{}
	}

	if config.ClusterConfig == nil {
		config.ClusterConfig, err = rest.InClusterConfig()
	}

	if err != nil {
		return nil, err
	}

	clientset, err := kubernetes.NewForConfig(config.ClusterConfig)
	if err != nil {
		return nil, err
	}

	return &Kubernetes{Clientset: clientset, Config: config}, nil
}
1105657
func New(opts ...Option) *Interpolator {
	opts2 := &Options{}
	setOptions(opts, newOptionSetter(opts2))
	return NewWithOptions(opts2)
}
1147550
func New(w io.Writer, opts *BuilderOpts) (*Builder, error) {
	return newBuilder(w, opts)
}
853100
func New(client *docker.Client, conf *config.Config, logger *log.Logger) *API {
	return &API{client, conf, logger, nil}
}
1260529
func (factory *OpenweathermapBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := OpenweathermapBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
1187229
func New(dispatcher Dispatcher, opts ...options.Opt) *Service {
	params := defaultParams()
	options.Apply(params, opts)

	return &Service{
		params:     *params,
		dispatcher: dispatcher,
	}
}
312329
func (factory *HTMLExtractBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := HTMLExtractBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
421768
func New() (*Execution, error) {
	env, err := environment.New()
	if err != nil {
		return nil, err
	}

	dockerBinary, err := exec.LookPath(DefaultClientBinary)
	if err != nil {
		return nil, err
	}

	return &Execution{
		Execution:    *env,
		dockerBinary: dockerBinary,
	}, nil
}
114954
func (factory *TwilioBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := TwilioBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.ReloadOptions(options)

	return &bee
}
1121686
func NewBeeInstance(bee BeeConfig) *BeeInterface {
	factory := GetFactory(bee.Class)
	if factory == nil {
		panic("Unknown bee-class in config file: " + bee.Class)
	}
	mod := (*factory).New(bee.Name, bee.Description, bee.Options)
	RegisterBee(mod)

	return &mod
}
984940
func NewBee(name, factoryName, description string, options []BeeOption) Bee {
	c := BeeConfig{
		Name:        name,
		Class:       factoryName,
		Description: description,
		Options:     options,
	}
	b := Bee{
		config:    c,
		SigChan:   make(chan bool),
		waitGroup: &sync.WaitGroup{},
	}

	return b
}
643950
func New(robot *hal.Robot) (hal.Adapter, error) {
	c := &config{}
	env.MustProcess(c)

	a := &adapter{
		user:     c.User,
		password: c.Password,
		resource: c.Resource,
		rooms:    func() []string { return strings.Split(c.Rooms, ",") }(),
	}
	a.SetRobot(robot)
	return a, nil
}
251452
func New(apiKey string) *Handler {
	return NewFromNotifier(bugsnag.New(bugsnag.Configuration{
		APIKey: apiKey,
	}))
}
1230143
func New(code int32, message string, args ...interface{}) Error {
	if len(args) > 0 {
		return &apiError{code, fmt.Sprintf(message, args...)}
	}
	return &apiError{code, message}
}
156828
func New(r *NetIDRange, allocatorFactory allocator.AllocatorFactory) *Allocator {
	return &Allocator{
		netIDRange: r,
		alloc:      allocatorFactory(int(r.Size), r.String()),
	}
}