Documentation ¶
Index ¶
- Variables
- type Instance
- type Manager
- func (mgr *Manager) FindLatestByPlatformID(platformID string) (*Instance, error)
- func (mgr *Manager) FindLatestByPlatformOrLocalID(id string) (*Instance, error)
- func (mgr *Manager) List() ([]*Instance, error)
- func (mgr *Manager) RegisterAppListener(fn func(*Instance))
- func (mgr *Manager) Track(appRoot string) (*Instance, error)
- func (mgr *Manager) WatchAll(fn WatchFunc) error
- type WatchFunc
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("app not found")
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance describes an app instance known by the Encore daemon.
func NewInstance ¶
func (*Instance) LocalID ¶
LocalID reports a local, random id unique for this app, as persisted in the .encore/manifest.json file. It always returns a non-empty string.
func (*Instance) PlatformID ¶
PlatformID reports the Encore Platform's ID for this app. If the app is not linked it reports the empty string.
func (*Instance) PlatformOrLocalID ¶
PlatformOrLocalID reports PlatformID() if set and otherwise LocalID().
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager keeps track of known apps and watches them for changes.
func NewManager ¶
func (*Manager) FindLatestByPlatformID ¶
FindLatestByPlatformID finds the most recently updated app instance with the given platformID. If no such app is found it reports an error matching ErrNotFound.
func (*Manager) FindLatestByPlatformOrLocalID ¶ added in v1.9.3
func (*Manager) RegisterAppListener ¶ added in v1.5.0
RegisterAppListener registers a callback that gets invoked every time an app is tracked.