concierge

package
v0.4.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Concierge

type Concierge struct {
	// contains filtered or unexported fields
}

func New

func New(name, path string, cfg *Config) (*Concierge, error)

New creates a new Concierge for managing a Windows Service.

func (*Concierge) CreateService

func (c *Concierge) CreateService() error

CreateService configures the Windows service correctly, returning the service.

func (*Concierge) Delete

func (c *Concierge) Delete() error

Delete removes the service and any registry keys.

func (*Concierge) Disable

func (c *Concierge) Disable() error

Disable will stop the Windows Service.

func (*Concierge) Enable

func (c *Concierge) Enable() error

Enable will start the Windows Service. If the service doesn't exist it will create it.

func (*Concierge) ServiceExists

func (c *Concierge) ServiceExists() (bool, error)

ServiceExists retrieves the Windows service if exists.

func (*Concierge) State

func (c *Concierge) State() (svc.State, error)

State gets the state of the service. Examples are stopped, running, etc.

type Config

type Config struct {
	Args        []string
	Description string
	DisplayName string
	EnvVars     []string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL