// Initialize attaches the appropriate callbacks to make key bindings easier.
// i.e., update state of the world on a MappingNotify.
976315
func Initialize(xu *xgbutil.XUtil) {
	// Listen to mapping notify events
	xevent.MappingNotifyFun(updateMaps).Connect(xu, xevent.NoWindow)

	// Give us an initial mapping state...
	keyMap, modMap := MapsGet(xu)
	KeyMapSet(xu, keyMap)
	ModMapSet(xu, modMap)
}
1364081
func initialize() {
	defaultLogger = &Logger{
		infoLog:    log.New(os.Stderr, initText+tagInfo, flags),
		warningLog: log.New(os.Stderr, initText+tagWarning, flags),
		errorLog:   log.New(os.Stderr, initText+tagError, flags),
		fatalLog:   log.New(os.Stderr, initText+tagFatal, flags),
	}
}
842676
func (s *Discovery) Initialize(_ string, heartbeat time.Duration, _ time.Duration, _ map[string]string) error {
	s.heartbeat = heartbeat
	s.values = make([]string, 0)
	return nil
}
243987
func (c *commandBase) Initialize(params *Parameters) {
	c.p = params
	c.f.Register(c.GetFlags(), params)
}
264247
func (s *LocalService) Initialize(ctx contextAPI.Local) error {
	if ctx.Identifier().MSPID != s.mspID {
		return errors.Errorf("expecting context for MSP [%s] but got [%s]", s.mspID, ctx.Identifier().MSPID)
	}
	return s.service.initialize(ctx)
}
292354
func (c *TopCommand) Initialize(app *kingpin.Application, config *service.Config) {
	c.config = config
	c.top = app.Command("top", "Report diagnostic information")
	c.diagURL = c.top.Arg("diag-addr", "Diagnostic HTTP URL").Default("http://127.0.0.1:3434").String()
	c.refreshPeriod = c.top.Arg("refresh", "Refresh period").Default("5s").Duration()
}
1226546
func (agent *Agent) initialize(ctx context.Context) (context.Context, error) {
	ctx, err := agent.configureLogging(ctx)
	if err != nil {
		return ctx, err
	}
	if err = agent.configureMonitoring(ctx); err != nil {
		return ctx, err
	}

	// TODO(smut): Remove fallback on metadata server.
	if agent.server == "" {
		agent.server, err = metadata.Get("instance/attributes/machine_provider_server")
		if err != nil {
			return ctx, err
		}
	}
	if agent.serviceAccount == "" {
		agent.serviceAccount, err = metadata.Get("instance/attributes/machine_service_account")
		if err != nil {
			return ctx, err
		}
	}

	options := auth.Options{
		GCEAccountName:         agent.serviceAccount,
		ServiceAccountJSONPath: auth.GCEServiceAccount,
	}
	agent.client, err = auth.NewAuthenticator(ctx, auth.SilentLogin, options).Client()
	if err != nil {
		return ctx, err
	}
	metadataClient := metadata.NewClient(agent.client)
	agent.hostname, err = metadataClient.InstanceName()
	if err != nil {
		return ctx, err
	}
	agent.mp, err = getClient(ctx, agent.client, agent.server)
	if err != nil {
		return ctx, err
	}
	return ctx, nil
}
43552
func (s *Discovery) Initialize(path string, heartbeat time.Duration, ttl time.Duration, _ map[string]string) error {
	s.path = path
	s.heartbeat = heartbeat
	return nil
}
22760
func Initialize(c context.Context, m monitor.Monitor, s store.Store) {
	state := GetState(c)
	state.SetMonitor(m)
	state.SetStore(s)
}
1323780
func (p *Project) initialize(ctx context.Context) error {
	if p.networks != nil {
		if err := p.networks.Initialize(ctx); err != nil {
			return err
		}
	}
	if p.volumes != nil {
		if err := p.volumes.Initialize(ctx); err != nil {
			return err
		}
	}
	return nil
}
474520
func (c *StatusCommand) Initialize(app *kingpin.Application, config *service.Config) {
	c.config = config
	c.status = app.Command("status", "Report cluster status")
}
770859
func (s *service) initialize(ctx contextAPI.Client) error {
	s.lock.Lock()
	defer s.lock.Unlock()

	if s.ctx != nil {
		// Already initialized
		logger.Debugf("Already initialized with context: %#v", s.ctx)
		return nil
	}

	discoveryClient, err := clientProvider(ctx)
	if err != nil {
		return errors.Wrap(err, "error creating discover client")
	}

	logger.Debugf("Initializing with context: %#v", ctx)
	s.ctx = ctx
	s.discClient = discoveryClient
	return nil
}
521811
func (e *EOSClient) Initialize() error {
	eosError := C.EdsInitializeSDK()
	if eosError != C.EDS_ERR_OK {
		return errors.New("Error when initializing Canon SDK")
	}
	return nil
}
1236027
func (app *App) Initialize() {
	log.Println("App Initialize")

	app.AddForm("login", forms.FormLogin{})
	app.AddForm("home", forms.FormHome{})

	app.GoTo("login", nil)
}
934921
func (c *ExampleService) Initialize() error {
	return c.kv.Update(func(tx Tx) error {
		if _, err := tx.Bucket([]byte(exampleBucket)); err != nil {
			return err
		}
		if _, err := tx.Bucket([]byte(exampleIndex)); err != nil {
			return err
		}
		return nil
	})
}
1022881
func (loader *PluginLoader) Initialize() error {
	for _, p := range loader.plugins {
		err := p.Init()
		if err != nil {
			return err
		}
	}

	return nil
}
27771
func (i pluginInitializer) Initialize(plugin admission.Interface) {
	if wants, ok := plugin.(WantsInternalWardleInformerFactory); ok {
		wants.SetInternalWardleInformerFactory(i.informers)
	}
}