Documentation
¶
Index ¶
- func NewWinsvcDriver(logger hclog.Logger) drivers.DriverPlugin
- type Config
- type Driver
- func (d *Driver) Capabilities() (*drivers.Capabilities, error)
- func (d *Driver) ConfigSchema() (*hclspec.Spec, error)
- func (d *Driver) DestroyTask(taskID string, force bool) error
- func (d *Driver) ExecTask(taskID string, cmd []string, timeout time.Duration) (*drivers.ExecTaskResult, error)
- func (d *Driver) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error)
- func (d *Driver) InspectTask(taskID string) (*drivers.TaskStatus, error)
- func (d *Driver) PluginInfo() (*base.PluginInfoResponse, error)
- func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error
- func (d *Driver) SetConfig(cfg *base.Config) error
- func (d *Driver) Shutdown(ctx context.Context) error
- func (d *Driver) SignalTask(taskID string, signal string) error
- func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drivers.DriverNetwork, error)
- func (d *Driver) StopTask(taskID string, timeout time.Duration, signal string) error
- func (d *Driver) TaskConfigSchema() (*hclspec.Spec, error)
- func (d *Driver) TaskEvents(ctx context.Context) (<-chan *drivers.TaskEvent, error)
- func (d *Driver) TaskStats(ctx context.Context, taskID string, interval time.Duration) (<-chan *drivers.TaskResourceUsage, error)
- func (d *Driver) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error)
- type ServiceClient
- func (c ServiceClient) CreateService(name string, executable string, username string, password string, ...) error
- func (c ServiceClient) GetServiceStats(name string) (*wmiProcessStats, error)
- func (c ServiceClient) InspectService(name string) (*Win32Service, error)
- func (c ServiceClient) IsServiceRunning(name string) (bool, error)
- func (c ServiceClient) KillService(name string) error
- func (c ServiceClient) RemoveService(name string) error
- func (c ServiceClient) StartService(name string) error
- func (c ServiceClient) StopService(name string) error
- type ServiceClientInterface
- type TaskConfig
- type TaskState
- type Win32Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWinsvcDriver ¶
func NewWinsvcDriver(logger hclog.Logger) drivers.DriverPlugin
Types ¶
type Config ¶
type Config struct { }
Config is the driver configuration set by the SetConfig RPC call
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) Capabilities ¶
func (d *Driver) Capabilities() (*drivers.Capabilities, error)
func (*Driver) Fingerprint ¶
func (*Driver) InspectTask ¶
func (d *Driver) InspectTask(taskID string) (*drivers.TaskStatus, error)
func (*Driver) PluginInfo ¶
func (d *Driver) PluginInfo() (*base.PluginInfoResponse, error)
func (*Driver) RecoverTask ¶
func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error
func (*Driver) StartTask ¶
func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drivers.DriverNetwork, error)
func (*Driver) TaskEvents ¶
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
func (ServiceClient) CreateService ¶
func (ServiceClient) GetServiceStats ¶
func (c ServiceClient) GetServiceStats(name string) (*wmiProcessStats, error)
func (ServiceClient) InspectService ¶
func (c ServiceClient) InspectService(name string) (*Win32Service, error)
func (ServiceClient) IsServiceRunning ¶
func (c ServiceClient) IsServiceRunning(name string) (bool, error)
func (ServiceClient) KillService ¶
func (c ServiceClient) KillService(name string) error
func (ServiceClient) RemoveService ¶
func (c ServiceClient) RemoveService(name string) error
func (ServiceClient) StartService ¶
func (c ServiceClient) StartService(name string) error
func (ServiceClient) StopService ¶
func (c ServiceClient) StopService(name string) error
type ServiceClientInterface ¶
type ServiceClientInterface interface { CreateService(name string, executable string, username string, password string, args []string) error RemoveService(name string) error StartService(name string) error StopService(name string) error KillService(name string) error InspectService(name string) (*Win32Service, error) IsServiceRunning(name string) (bool, error) GetServiceStats(name string) (*wmiProcessStats, error) }
type TaskConfig ¶
type TaskConfig struct { // This struct is the decoded version of the schema defined in the // taskConfigSpec variable above. It's used to convert the string // configuration for the task into Go contructs. Executable string `codec:"executable"` Args []string `codec:"args"` Username string `codec:"username"` Password string `codec:"password"` }
Click to show internal directories.
Click to hide internal directories.