// GetRouterManager starts a management connection with the router
502377
func GetRouterManager(ctx ttnlog.Interface) (*grpc.ClientConn, router.RouterManagerClient) {
	ctx.Info("Discovering Router...")
	dscConn, client := GetDiscovery(ctx)
	defer dscConn.Close()
	routerAnnouncement, err := client.Get(GetContext(ctx), &discovery.GetRequest{
		ServiceName: "router",
		ID:          viper.GetString("router-id"),
	})
	if err != nil {
		ctx.WithError(errors.FromGRPCError(err)).Fatal("Could not get Router from Discovery")
	}
	ctx.Info("Connecting with Router...")
	rtrConn, err := routerAnnouncement.Dial(nil)
	if err != nil {
		ctx.WithError(err).Fatal("Could not connect to Router")
	}
	ctx.Info("Connected to Router")
	return rtrConn, router.NewRouterManagerClient(rtrConn)
}
703854
func (r *Router) GET(route string, handler interface{}) *Router {
	r.Handle(MethodGET, route, handler)
	return r
}
943759
func getPackageManager() (manager.PackageManager, error) {
	hostSeries, err := series.HostSeries()
	if err != nil {
		return nil, errors.Trace(err)
	}
	return manager.NewPackageManager(hostSeries)
}
369569
func (api *ProjectsAPI) GetRouters(projectID string, options *RouterGetOptions) (result *Routers, err error) {
	uri := api.client.Endpoint + projectUrl + projectID + "/routers"
	if options != nil {
		uri += getQueryString(options)
	}
	res, err := api.client.restClient.GetList(api.client.Endpoint, uri, api.client.options.TokenOptions)
	if err != nil {
		return
	}

	result = &Routers{}
	err = json.Unmarshal(res, result)
	return
}
975121
func (r *router) RegisterManager(s *grpc.Server) {
	server := &routerManager{r}
	pb.RegisterRouterManagerServer(s, server)
}
320506
func (r *Registry) SessionManager() *SessionManager {
	return r.Get(r.content().SessionManager.Reference()).(*SessionManager)
}
62718
func (v *RPC) GetRoutingDelegate() (o string) {
	if v != nil && v.RoutingDelegate != nil {
		return *v.RoutingDelegate
	}

	return
}
982814
func (p *Provider) GetLogger(module string) api.Logger {
	newDefLogger := log.New(os.Stdout, fmt.Sprintf(logPrefixFormatter, module), log.Ldate|log.Ltime|log.LUTC)
	return &Log{deflogger: newDefLogger, module: module}
}
939038
func (db *Database) GetEncrypterManager(transformedKey []byte) (*EncrypterManager, error) {
	return NewEncrypterManager(
		buildMasterKey(db, transformedKey),
		db.Header.FileHeaders.EncryptionIV,
	)
}
698738
func GetLogger(name string) Logger {
	if len(name) > 0 {
		return manager.GetLogger(name)
	} else {
		return root
	}
}
773038
func (db *Database) GetStreamManager() (*StreamManager, error) {
	if db.Header.FileHeaders != nil {
		if db.Header.IsKdbx4() {
			return NewStreamManager(
				db.Content.InnerHeader.InnerRandomStreamID,
				db.Content.InnerHeader.InnerRandomStreamKey,
			)
		}

		return NewStreamManager(
			db.Header.FileHeaders.InnerRandomStreamID,
			db.Header.FileHeaders.ProtectedStreamKey,
		)
	}
	return nil, nil
}
37592
func (conf *Config) GetRouters() []PluginConfig {
	configs := []PluginConfig{}

	for _, config := range conf.Plugins {
		if !config.Enable || config.Typename == "" {
			continue // ### continue, disabled ###
		}

		pluginType := TypeRegistry.GetTypeOf(config.Typename)
		if pluginType == nil {
			continue // ### continue, unknown type ###
		}

		if pluginType.Implements(routerInterface) {
			logrus.Debugf("Found router '%s'", config.ID)
			configs = append(configs, config)
		}
	}

	return configs
}
906941
func (rm *RouteManager) GetAll() ([]*Route, error) {
	rm.Lock()
	defer rm.Unlock()
	routes := make([]*Route, 0)
	for _, route := range rm.routes {
		routes = append(routes, route)
	}
	return routes, nil
}
753710
func (b *BigIP) GetRoute(name string) (*Route, error) {
	var route Route
	err, _ := b.getForEntity(&route, uriNet, uriRoute, name)

	if err != nil {
		return nil, err
	}

	return &route, nil
}
173890
func NewManager(routers map[string]*config.TCPRouter,
	serviceManager *tcpservice.Manager,
	httpHandlers map[string]http.Handler,
	httpsHandlers map[string]http.Handler,
	tlsConfig *tls.Config,
) *Manager {
	return &Manager{
		configs:        routers,
		serviceManager: serviceManager,
		httpHandlers:   httpHandlers,
		httpsHandlers:  httpsHandlers,
		tlsConfig:      tlsConfig,
	}
}
436012
func (vpcApi *VpcApi) RestartRouter(id string) (bool, error) {
	_, err := vpcApi.entityService.Execute(id, VPC_RESTART_ROUTER_OPERATION, []byte{}, map[string]string{})
	return err == nil, err
}
1126865
func NewManager(routers map[string]*config.Router,
	serviceManager *service.Manager, middlewaresBuilder *middleware.Builder, modifierBuilder *responsemodifiers.Builder,
) *Manager {
	return &Manager{
		routerHandlers:     make(map[string]http.Handler),
		configs:            routers,
		serviceManager:     serviceManager,
		middlewaresBuilder: middlewaresBuilder,
		modifierBuilder:    modifierBuilder,
	}
}