Documentation
¶
Overview ¶
Package autostart manage start at login unit files for darwin/linux
Package autostart manage start at login unit files for darwin/linux
Index ¶
- Variables
- func AutoStartedIdentifier() string
- func IsRegistered(ctx context.Context, inst *limatype.Instance) (bool, error)
- func Manager() autoStartManager
- func RegisterToStartAtLogin(ctx context.Context, inst *limatype.Instance) error
- func RequestStart(ctx context.Context, inst *limatype.Instance) error
- func RequestStop(ctx context.Context, inst *limatype.Instance) (bool, error)
- func UnregisterFromStartAtLogin(ctx context.Context, inst *limatype.Instance) error
- type TemplateFileBasedManager
- func (t *TemplateFileBasedManager) AutoStartedIdentifier() string
- func (t *TemplateFileBasedManager) IsRegistered(_ context.Context, inst *limatype.Instance) (bool, error)
- func (t *TemplateFileBasedManager) RegisterToStartAtLogin(ctx context.Context, inst *limatype.Instance) error
- func (t *TemplateFileBasedManager) RequestStart(ctx context.Context, inst *limatype.Instance) error
- func (t *TemplateFileBasedManager) RequestStop(ctx context.Context, inst *limatype.Instance) (bool, error)
- func (t *TemplateFileBasedManager) UnregisterFromStartAtLogin(ctx context.Context, inst *limatype.Instance) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSupported = fmt.Errorf("autostart is not supported on %s", runtime.GOOS)
Functions ¶
func AutoStartedIdentifier ¶
func AutoStartedIdentifier() string
AutoStartedIdentifier returns the identifier if the current process was started by the autostart manager.
func IsRegistered ¶
IsRegistered checks if the instance is registered to start at login.
func RegisterToStartAtLogin ¶
RegisterToStartAtLogin creates a start-at-login entry for the instance.
func RequestStart ¶
RequestStart requests to start the instance by identifier.
func RequestStop ¶
RequestStop requests to stop the instance by identifier.
Types ¶
type TemplateFileBasedManager ¶
type TemplateFileBasedManager struct {
// contains filtered or unexported fields
}
TemplateFileBasedManager is an autostart manager that uses a template file to create the autostart entry.
func (*TemplateFileBasedManager) AutoStartedIdentifier ¶
func (t *TemplateFileBasedManager) AutoStartedIdentifier() string
func (*TemplateFileBasedManager) IsRegistered ¶
func (*TemplateFileBasedManager) RegisterToStartAtLogin ¶
func (*TemplateFileBasedManager) RequestStart ¶
func (*TemplateFileBasedManager) RequestStop ¶
func (*TemplateFileBasedManager) UnregisterFromStartAtLogin ¶
Click to show internal directories.
Click to hide internal directories.