// SessionInit init memory session
431389
func (pder *MemProvider) SessionInit(maxlifetime int64, savePath string) error {
	pder.maxlifetime = maxlifetime
	pder.savePath = savePath
	return nil
}
61029
func Init(session *mgo.Session) {
	if !flag.Parsed() {
		flag.Parse()
	}

	// alloc the collection managers
	vendorCM := storage.NewVendorCollectionManager(session)
	recordCM := storage.NewRecordCollectionManager(session)

	// alloc source manager
	sourceM, err := source.NewManager(*mockMode, *githubUsername)
	if err != nil {
		log.Fatal(err)
	}

	// alloc the worker
	worker := worker.NewWorker(sourceM, vendorCM, recordCM)

	// alloc timer
	timer, err := timer.NewTimer(time.Duration(*period), worker)
	if err != nil {
		log.Fatal(err)
	}

	timer.Run()

	// run rest service
	runRESTService()
}
593410
func (ds DataSource) Init(ctx sessionctx.Context) *DataSource {
	ds.baseLogicalPlan = newBaseLogicalPlan(ctx, TypeTableScan, &ds)
	return &ds
}
351234
func (session *Session) Init() {
	session.statement.Init()
	session.statement.Engine = session.engine
	session.isAutoCommit = true
	session.isCommitedOrRollbacked = false
	session.isAutoClose = false
	session.autoResetStatement = true
	session.prepareStmt = false

	// !nashtsai! is lazy init better?
	session.afterInsertBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.afterUpdateBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.afterDeleteBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.beforeClosures = make([]func(interface{}), 0)
	session.afterClosures = make([]func(interface{}), 0)
	session.stmtCache = make(map[uint32]*core.Stmt)

	session.afterProcessors = make([]executedProcessor, 0)

	session.lastSQL = ""
	session.lastSQLArgs = []interface{}{}

	session.ctx = session.engine.defaultContext
}
453748
func init() {
	log.Out = os.Stdout
	if debug {
		log.Level = logger.DebugLevel
	}
}
369617
func (mr *MockServiceDiscoveryMockRecorder) Init() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockServiceDiscovery)(nil).Init))
}
772409
func (b *LRUCache) Init(capacity uint) {
	b.table = make(map[string]*entry, capacity)
	b.priorityQueue = make([]*entry, 0, capacity)
	b.lruList.Init()
	b.freeList.Init()
	heap.Init(&b.priorityQueue)

	// Reserve all the entries in one giant continous block of memory
	arrayOfEntries := make([]entry, capacity)
	for i := uint(0); i < capacity; i++ {
		e := &arrayOfEntries[i]
		e.element.Value = e
		e.index = -1
		b.freeList.PushElementBack(&e.element)
	}
}
1180043
func (p *NodbProvider) Init(expire int64, configs string) error {
	p.expire = expire

	cfg := new(config.Config)
	cfg.DataDir = configs
	dbs, err := nodb.Open(cfg)
	if err != nil {
		return fmt.Errorf("session/nodb: error opening db: %v", err)
	}

	p.c, err = dbs.Select(0)
	return err
}
790765
func initSessionEngine() {
	// Check for session engine to use and assign it
	sename := Config.StringDefault("session.engine", "revel-cookie")
	if se, found := sessionEngineMap[sename]; found {
		CurrentSessionEngine = se()
	} else {
		sessionLog.Warn("Session engine '%s' not found, using default session engine revel-cookie", sename)
		CurrentSessionEngine = sessionEngineMap["revel-cookie"]()
	}
}
607527
func (f *sessionUDPFactory) InitPool(msgSize int) {
	f.udpPool.New = func() interface{} {
		return &sessionUDP{
			f:   f,
			m:   make([]byte, msgSize),
			oob: make([]byte, udpOOBSize),
		}
	}
}
850372
func (p Update) Init(ctx sessionctx.Context) *Update {
	p.basePlan = newBasePlan(ctx, TypeUpdate)
	return &p
}
900161
func (b *BigtableIdx) Init() error {
	log.Infof("bigtable-idx: Initializing. Project=%s, Instance=%s", b.cfg.GcpProject, b.cfg.BigtableInstance)
	if err := b.MemoryIndex.Init(); err != nil {
		return err
	}

	if err := b.InitBare(); err != nil {
		return err
	}

	if b.cfg.UpdateBigtableIdx {
		b.wg.Add(b.cfg.WriteConcurrency)
		for i := 0; i < b.cfg.WriteConcurrency; i++ {
			go b.processWriteQueue()
		}
		log.Infof("bigtable-idx: started %d writeQueue handlers", b.cfg.WriteConcurrency)
	}

	b.rebuildIndex()
	if memory.IndexRules.Prunable() {
		b.wg.Add(1)
		go b.prune()
	}
	return nil
}
907291
func Init(h sort.Interface) {
	// heapify
	n := h.Len()
	for i := n/2 - 1; i >= 0; i-- {
		heapDown(n, h.Less, h.Swap, i)
	}
}
866828
func (mr *MockRPCClientMockRecorder) Init() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockRPCClient)(nil).Init))
}
1233188
func (s *PlaybackConfiguration) SetSessionInitializationEndpointPrefix(v string) *PlaybackConfiguration {
	s.SessionInitializationEndpointPrefix = &v
	return s
}
75191
func (g *GoHttpServer) Init(init *EngineInit) {
	g.MaxMultipartSize = int64(Config.IntDefault("server.request.max.multipart.filesize", 32)) << 20 /* 32 MB */
	g.goContextStack = utils.NewStackLock(Config.IntDefault("server.context.stack", 100),
		Config.IntDefault("server.context.maxstack", 200),
		func() interface{} {
			return NewGoContext(g)
		})
	g.goMultipartFormStack = utils.NewStackLock(Config.IntDefault("server.form.stack", 100),
		Config.IntDefault("server.form.maxstack", 200),
		func() interface{} { return &GoMultipartForm{} })
	g.ServerInit = init

	revelHandler := http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
		g.Handle(writer, request)
	})

	// Adds the mux list
	g.HttpMuxList = init.HTTPMuxList
	sort.Sort(g.HttpMuxList)
	g.HasAppMux = len(g.HttpMuxList) > 0
	g.signalChan = make(chan os.Signal)

	g.Server = &http.Server{
		Addr:         init.Address,
		Handler:      revelHandler,
		ReadTimeout:  time.Duration(Config.IntDefault("http.timeout.read", 0)) * time.Second,
		WriteTimeout: time.Duration(Config.IntDefault("http.timeout.write", 0)) * time.Second,
	}

}
789582
func (s *GetPlaybackConfigurationOutput) SetSessionInitializationEndpointPrefix(v string) *GetPlaybackConfigurationOutput {
	s.SessionInitializationEndpointPrefix = &v
	return s
}