iis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIISDriver

func NewIISDriver(logger hclog.Logger) drivers.DriverPlugin

NewIISDriver returns a new driver plugin implementation.

Types

type Config

type Config struct {
	// Enabled is set to true to enable the win_iis driver
	Enabled       bool   `codec:"enabled"`
	StatsInterval string `codec:"stats_interval"`
}

Config contains configuration information for the plugin

type Driver

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

Driver is a driver for running windows IIS tasks.

func (*Driver) Capabilities

func (d *Driver) Capabilities() (*drivers.Capabilities, error)

Capabilities returns the features supported by the driver.

func (*Driver) ConfigSchema

func (d *Driver) ConfigSchema() (*hclspec.Spec, error)

ConfigSchema returns the plugin configuration schema.

func (*Driver) DestroyTask

func (d *Driver) DestroyTask(taskID string, force bool) error

DestroyTask cleans up and removes a task that has terminated.

func (*Driver) ExecTask

func (d *Driver) ExecTask(taskID string, cmd []string, timeout time.Duration) (*drivers.ExecTaskResult, error)

ExecTask returns the result of executing the given command inside a task. This is an optional capability.

func (*Driver) Fingerprint

func (d *Driver) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error)

Fingerprint returns a channel that will be used to send health information and other driver specific node attributes.

func (*Driver) InspectTask

func (d *Driver) InspectTask(taskID string) (*drivers.TaskStatus, error)

InspectTask returns detailed status information for the referenced taskID.

func (*Driver) PluginInfo

func (d *Driver) PluginInfo() (*base.PluginInfoResponse, error)

PluginInfo returns information describing the plugin.

func (*Driver) RecoverTask

func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error

RecoverTask recreates the in-memory state of a task from a TaskHandle.

func (*Driver) SetConfig

func (d *Driver) SetConfig(cfg *base.Config) error

SetConfig is called by the client to pass the configuration for the plugin.

func (*Driver) SignalTask

func (d *Driver) SignalTask(taskID string, signal string) error

SignalTask forwards a signal to a task. This is an optional capability. IIS doesn't natively allow users to send signals, so this driver will abide by that.

func (*Driver) StartTask

StartTask returns a task handle and a driver network if necessary.

func (*Driver) StopTask

func (d *Driver) StopTask(taskID string, timeout time.Duration, signal string) error

StopTask stops a running task with the given signal and within the timeout window.

func (*Driver) TaskConfigSchema

func (d *Driver) TaskConfigSchema() (*hclspec.Spec, error)

TaskConfigSchema returns the HCL schema for the configuration of a task.

func (*Driver) TaskEvents

func (d *Driver) TaskEvents(ctx context.Context) (<-chan *drivers.TaskEvent, error)

TaskEvents returns a channel that the plugin can use to emit task related events.

func (*Driver) TaskStats

func (d *Driver) TaskStats(ctx context.Context, taskID string, interval time.Duration) (<-chan *drivers.TaskResourceUsage, error)

TaskStats returns a channel which the driver should send stats to at the given interval.

func (*Driver) WaitTask

func (d *Driver) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error)

WaitTask returns a channel used to notify Nomad when a task exits.

type TaskConfig

type TaskConfig struct {
	Path              string             `codec:"path"`
	AppPoolConfigPath string             `codec:"apppool_config_path"`
	SiteConfigPath    string             `codec:"site_config_path"`
	AppPoolIdentity   iisAppPoolIdentity `codec:"apppool_identity"`
	Bindings          []iisBinding       `codec:"bindings"`
}

TaskConfig contains configuration information for a task that runs with this plugin

type TaskState

type TaskState struct {
	StartedAt time.Time
}

TaskState is the runtime state which is encoded in the handle returned to Nomad client. This information is needed to rebuild the task state and handler during recovery.

Jump to

Keyboard shortcuts

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