// AddComponent to the base component, just for building
// the component tree
764715
func (c *Component) AddComponent(cc Componenter) {
	c.Elements = append(c.Elements, cc)
}
669681
func (c *SimpleComponentMatcher) AddComponents(sc ...StaticComponent) {
	c.comp = append(c.comp, sc...)
}
832799
func WithComponentName(componentName string) Option {
	return func(c *config) {
		if componentName != "" {
			c.tracerOptions.Tags[lightstep.ComponentNameKey] = componentName
		}
	}
}
954042
func (a *Account) CreateComponent(typ, id string) error {
	p, err := plural(typ)
	if err != nil {
		return err
	}

	body := createComponentReq{
		ID: id,
	}
	return a.post(a.auth, fmt.Sprintf("/api/v2/components/%s", p), body, nil)
}
677726
func (c *Frame) AddControl(t termboxControl) {
	c.controls = append(c.controls, t)
}
618841
func RegisterComponentFunc(name string, f ComponentFunc) error {
	if _, ok := registeredComponentFuncs[name]; ok {
		return errors.AlreadyExistsf("%s", name)
	}
	registeredComponentFuncs[name] = f
	return nil
}
939630
func (g *Graph) StronglyConnectedComponents() [][]Node {
	if g.Kind == Undirected {
		return g.sccUndirected()
	}
	return g.sccDirected()
}
650036
func (w *wizard) deployComponent() {
	// Print all the things we can deploy and wait or user choice
	fmt.Println()
	fmt.Println("What would you like to deploy? (recommended order)")
	fmt.Println(" 1. Ethstats  - Network monitoring tool")
	fmt.Println(" 2. Bootnode  - Entry point of the network")
	fmt.Println(" 3. Sealer    - Full node minting new blocks")
	fmt.Println(" 4. Explorer  - Chain analysis webservice (ethash only)")
	fmt.Println(" 5. Wallet    - Browser wallet for quick sends")
	fmt.Println(" 6. Faucet    - Crypto faucet to give away funds")
	fmt.Println(" 7. Dashboard - Website listing above web-services")

	switch w.read() {
	case "1":
		w.deployEthstats()
	case "2":
		w.deployNode(true)
	case "3":
		w.deployNode(false)
	case "4":
		w.deployExplorer()
	case "5":
		w.deployWallet()
	case "6":
		w.deployFaucet()
	case "7":
		w.deployDashboard()
	default:
		log.Error("That's not something I can do")
	}
}
351068
func ExtraConfigForComponent(component string, opts util.ExtraOptionSlice, version semver.Version) (map[string]string, error) {
	versionedOpts, err := DefaultOptionsForComponentAndVersion(component, version)
	if err != nil {
		return nil, errors.Wrapf(err, "setting version specific options for %s", component)
	}

	for _, opt := range opts {
		if opt.Component == component {
			if val, ok := versionedOpts[opt.Key]; ok {
				glog.Infof("Overwriting default %s=%s with user provided %s=%s for component %s", opt.Key, val, opt.Key, opt.Value, component)
			}
			versionedOpts[opt.Key] = opt.Value
		}
	}

	return versionedOpts, nil
}
780148
func renderComponent(next Component, prev ComponentOrHTML) (nextHTML *HTML, skip bool, pendingMounts []Mounter) {
	// If we had a component last render, and it's of compatible type, operate
	// on the previous instance.
	if prevComponent, ok := prev.(Component); ok && sameType(next, prevComponent) {
		// Copy `vecty:"prop"` fields from the newly rendered component (next)
		// into the persistent component instance (prev) so that it is aware of
		// what properties the parent has specified during SkipRender/Render
		// below.
		copyProps(next, prevComponent)
		// Persist the previous component across renders.
		next = prevComponent
	}

	// Before rendering, consult the Component's SkipRender method to see if we
	// should skip rendering or not.
	if rs, ok := next.(RenderSkipper); ok {
		prevRenderComponent := next.Context().prevRenderComponent
		if prevRenderComponent != nil {
			if next == prevRenderComponent {
				panic("vecty: internal error (SkipRender called with identical prev component)")
			}
			if rs.SkipRender(prevRenderComponent) {
				return nil, true, nil
			}
		}
	}

	// Render the component into HTML, handling nil renders.
	nextRender := next.Render()
	prevRender := next.Context().prevRender
	if nextRender == nil {
		// nil renders are translated into noscript tags.
		nextRender = Tag("noscript")
	}

	switch v := nextRender.(type) {
	case Component:
		nextHTML, skip, pendingMounts = renderComponent(v, prevRender)
		if skip {
			return nextHTML, skip, pendingMounts
		}
		if prevComponent, ok := prevRender.(Component); ok && sameType(v, prevComponent) {
			nextRender = prevRender
		}
	case *HTML:
		if v == nil {
			// nil renders are translated into noscript tags.
			v = Tag("noscript")
		}
		nextHTML = v
		// Reconcile the actual rendered HTML.
		pendingMounts = nextHTML.reconcile(extractHTML(prev))
	default:
		panic("vecty: internal error (unexpected ComponentOrHTML type " + reflect.TypeOf(v).String() + ")")
	}

	m := mountUnmount(nextRender, prevRender)
	if m != nil {
		pendingMounts = append(pendingMounts, m)
	}

	// Update the context to consider this render.
	next.Context().prevRender = nextRender
	next.Context().prevRenderComponent = copyComponent(next)
	next.Context().unmounted = false
	return nextHTML, false, pendingMounts
}
74736
func addChild(parent Plan, child Plan) {
	if child == nil || parent == nil {
		return
	}
	child.AddParent(parent)
	parent.AddChild(child)
}
617859
func Import(c ...Compo) {
	for _, compo := range c {
		if _, err := components.register(compo); err != nil {
			Panicf("import component failed: %s", err)
		}
	}
}
1032528
func (p *basePlan) AddChild(child Plan) {
	p.children = append(p.children, child)
}
396058
func (c *FakeComponentStatuses) Update(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{})
	if obj == nil {
		return nil, err
	}
	return obj.(*corev1.ComponentStatus), err
}
708820
func (n *Graph) AddNew(processName string, componentName string, f *Factory) error {
	proc, err := f.Create(componentName)
	if err != nil {
		return err
	}
	return n.Add(processName, proc)
}
834589
func ContextComponent(ctx HookContext) (Component, error) {
	compCtx, err := ctx.Component(payload.ComponentName)
	if errors.IsNotFound(err) {
		return nil, errors.Errorf("component %q not registered", payload.ComponentName)
	}
	if err != nil {
		return nil, errors.Trace(err)
	}
	if compCtx == nil {
		return nil, errors.Errorf("component %q disabled", payload.ComponentName)
	}
	return compCtx, nil
}
1323892
func (a *Agent) AddService(service *structs.NodeService, chkTypes []*structs.CheckType, persist bool, token string, source configSource) error {
	a.stateLock.Lock()
	defer a.stateLock.Unlock()
	return a.addServiceLocked(service, chkTypes, persist, token, source)
}