// PatEngine is pat router.
328064
func PatEngine() *pat.Router {
	r := pat.New()

	r.Get("/user/{name}", patUserHandler)
	r.Get("/", patHelloHandler)

	return r
}
27582
func (s *DBEngineVersion) SetEngine(v string) *DBEngineVersion {
	s.Engine = &v
	return s
}
904868
func (s *UpgradeTarget) SetEngine(v string) *UpgradeTarget {
	s.Engine = &v
	return s
}
33909
func (r *muxEntry) Router(pattern string, ch context.ContextHandle) {
	r.set(pattern, "", ch)
}
927370
func (r *Router) Head(path string, fn interface{}) *Router {
	return r.addRoute(httpMethodHead, path, fn)
}
1109522
func (s *GlobalCluster) SetEngine(v string) *GlobalCluster {
	s.Engine = &v
	return s
}
1093885
func (session *Session) StoreEngine(storeEngine string) *Session {
	session.statement.StoreEngine = storeEngine
	return session
}
83668
func routes() *pat.Router {
	Router.Get("/ping", func(rw http.ResponseWriter, req *http.Request) {
		rw.Write([]byte("pong\n"))
	})
	// Router.Get("/list", handleRequest(list))
	// Router.Get("/subscribe", handleRequest(subscribe))
	// Router.Get("/unsubscribe", handleRequest(unsubscribe))

	return Router
}
939522
func NewEngine(path string, c Config, options ...Option) *Engine {
	e := &Engine{
		config:              c,
		path:                path,
		defaultMetricLabels: prometheus.Labels{},
		logger:              zap.NewNop(),
	}

	// Initialize series file.
	e.sfile = tsdb.NewSeriesFile(c.GetSeriesFilePath(path))

	// Initialise index.
	e.index = tsi1.NewIndex(e.sfile, c.Index,
		tsi1.WithPath(c.GetIndexPath(path)))

	// Initialize WAL
	var wal tsm1.Log = new(tsm1.NopWAL)
	if c.WAL.Enabled {
		e.wal = tsm1.NewWAL(c.GetWALPath(path))
		e.wal.WithFsyncDelay(time.Duration(c.WAL.FsyncDelay))
		e.wal.EnableTraceLogging(c.TraceLoggingEnabled)
		wal = e.wal
	}

	// Initialise Engine
	e.engine = tsm1.NewEngine(c.GetEnginePath(path), e.index, c.Engine,
		tsm1.WithWAL(wal),
		tsm1.WithTraceLogging(c.TraceLoggingEnabled))

	// Apply options.
	for _, option := range options {
		option(e)
	}
	// Set default metrics labels.
	e.engine.SetDefaultMetricLabels(e.defaultMetricLabels)
	e.sfile.SetDefaultMetricLabels(e.defaultMetricLabels)
	e.index.SetDefaultMetricLabels(e.defaultMetricLabels)

	return e
}
804283
func NewEngine(name string, database DatabaseProxy, cache CacheProxy) Engine {
	eng := &engine{
		name:     name,
		database: database,
		cache:    cache,
		indexes:  make(map[string]map[string]Index),
	}
	if eng.cache == nil {
		eng.cache = NullCacheProxy
	}
	return eng
}
144699
func (s *OrderableDBInstanceOption) SetEngine(v string) *OrderableDBInstanceOption {
	s.Engine = &v
	return s
}
637520
func (c Config) GetEnginePath(base string) string {
	if c.EnginePath != "" {
		return c.EnginePath
	}
	return filepath.Join(base, DefaultEngineDirectoryName)
}
464374
func GetBackupEngine() (BackupEngine, error) {
	be, ok := BackupEngineMap[*backupEngineImplementation]
	if !ok {
		return nil, vterrors.New(vtrpc.Code_NOT_FOUND, "no registered implementation of BackupEngine")
	}
	return be, nil
}
1082971
func (s *DescribeDBEngineVersionsInput) SetEngine(v string) *DescribeDBEngineVersionsInput {
	s.Engine = &v
	return s
}
360875
func (s *DBSnapshot) SetEngine(v string) *DBSnapshot {
	s.Engine = &v
	return s
}
989752
func NewEngine(ts srvtopo.Server, se *schema.Engine) *Engine {
	vse := &Engine{
		streamers:    make(map[int]*vstreamer),
		rowStreamers: make(map[int]*rowStreamer),
		kschema:      &vindexes.KeyspaceSchema{},
		ts:           ts,
		se:           se,
	}
	once.Do(func() {
		vschemaErrors = stats.NewCounter("VSchemaErrors", "Count of VSchema errors")
		vschemaUpdates = stats.NewCounter("VSchemaUpdates", "Count of VSchema updates. Does not include errors")
		http.Handle("/debug/tablet_vschema", vse)
	})
	return vse
}
673958
func (s *DescribeCacheEngineVersionsInput) SetEngine(v string) *DescribeCacheEngineVersionsInput {
	s.Engine = &v
	return s
}