Documentation ¶
Index ¶
- type Resource
- type ResourceManager
- func (rm *ResourceManager) GetPubSub() *pubsub.NSQDaemon
- func (rm *ResourceManager) GetRedis() *redis.Server
- func (rm *ResourceManager) GetSQLCluster() *sqldb.Cluster
- func (rm *ResourceManager) StartPubSub(ctx context.Context) error
- func (rm *ResourceManager) StartRedis(ctx context.Context) error
- func (rm *ResourceManager) StartRequiredServices(a *optracker.AsyncBuildJobs, md *meta.Data)
- func (rm *ResourceManager) StartSQLCluster(a *optracker.AsyncBuildJobs, md *meta.Data) func(ctx context.Context) error
- func (rm *ResourceManager) StopAll()
- func (rm *ResourceManager) UpdateConfig(cfg *config.Runtime, md *meta.Data, dbProxyPort int) error
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
ResourceManager manages a set of infrastructure resources to support the running Encore application.
func NewResourceManager ¶
func NewResourceManager(app *apps.Instance, sqlMgr *sqldb.ClusterManager, environ environ.Environ, forTests bool) *ResourceManager
func (*ResourceManager) GetPubSub ¶
func (rm *ResourceManager) GetPubSub() *pubsub.NSQDaemon
GetPubSub returns the PubSub daemon if it is running otherwise it returns nil
func (*ResourceManager) GetRedis ¶
func (rm *ResourceManager) GetRedis() *redis.Server
GetRedis returns the Redis server if it is running otherwise it returns nil
func (*ResourceManager) GetSQLCluster ¶
func (rm *ResourceManager) GetSQLCluster() *sqldb.Cluster
GetSQLCluster returns the SQL cluster
func (*ResourceManager) StartPubSub ¶
func (rm *ResourceManager) StartPubSub(ctx context.Context) error
StartPubSub starts a PubSub daemon.
func (*ResourceManager) StartRedis ¶
func (rm *ResourceManager) StartRedis(ctx context.Context) error
StartRedis starts a Redis server.
func (*ResourceManager) StartRequiredServices ¶
func (rm *ResourceManager) StartRequiredServices(a *optracker.AsyncBuildJobs, md *meta.Data)
StartRequiredServices will start the required services for the current application if they are not already running based on the given parse result
func (*ResourceManager) StartSQLCluster ¶
func (rm *ResourceManager) StartSQLCluster(a *optracker.AsyncBuildJobs, md *meta.Data) func(ctx context.Context) error
func (*ResourceManager) StopAll ¶
func (rm *ResourceManager) StopAll()
func (*ResourceManager) UpdateConfig ¶
UpdateConfig updates the given config with infrastructure information. Note that all the requisite services must have started up already, which in practice means that (*optracker.AsyncBuildJobs).Wait must have returned first.