Documentation
¶
Index ¶
- func IsJailActive(jailname string) bool
- func Jailcmd(params map[string]string) error
- func Jailrctl(jname string, params map[string]uint) error
- func NewJailDriver(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 Rctl
- type TaskConfig
- type TaskState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsJailActive ¶
func NewJailDriver ¶
func NewJailDriver(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 Rctl ¶
type Rctl struct { Cputime uint `codec:"Cputime"` Datasize uint `codec:"Datasize"` Coredumpsize uint `codec:"Coredumpsize"` Stacksize uint `codec:"Stacksize"` Memoryuse uint `codec:"Memoryuse"` Memorylocked uint `codec:"Memorylocked"` Maxproc uint `codec:"Maxproc"` Openfiles uint `codec:"Openfiles"` Vmemoryuse uint `codec:"Vmemoryuse"` Pseudoterminals uint `codec:"Pseudoterminals"` Swapuse uint `codec:"Swapuse"` Nthr uint `codec:"Nthr"` Msgqqueued uint `codec:"Msgqqueued"` Msgqsize uint `codec:"Msgqsize"` Nmsgq uint `codec:"Nmsgq"` Nsemop uint `codec:"Nsemop"` Nshm uint `codec:"Nshm"` Shmsize uint `codec:"Shmsize"` Wallclock uint `codec:"Wallclock"` Pcpu uint `codec:"Pcpu"` Readbps uint `codec:"Readbps"` Writebps uint `codec:"Writebps"` Readiops uint `codec:"Readiops"` Writeiops uint `codec:"Writeiops"` }
type TaskConfig ¶
type TaskConfig struct { Path string `codec:"Path"` Jid string `codec:"Jid"` Ip4_addr string `codec:"Ip4_addr"` Ip4_saddrsel bool `codec:"Ip4_saddrsel"` Ip4 string `codec:"Ip4"` Ip6_addr string `codec:"Ip6_addr"` Ip6_saddrsel bool `codec:"Ip6_saddrsel"` Ip6 string `codec:"Ip6"` Vnet string `codec:"Vnet"` Host_hostname string `codec:"Host_hostname"` Host string `codec:"Host"` Securelevel string `codec:"Securelevel"` Devfs_ruleset string `codec:"Devfs_ruleset"` Children_max uint `codec:"Children_max"` Children_cur uint `codec:"Children_cur"` Enforce_statfs uint `codec:"Enforce_statfs"` Persist bool `codec:"Persist"` Osrelease string `codec:"Osrelease"` Osreldate string `codec:"Osreldate"` Allow_set_hostname bool `codec:"Allow_set_hostname"` Allow_sysvipc bool `codec:"Allow_sysvipc"` Allow_raw_sockets bool `codec:"Allow_raw_sockets"` Allow_chflags bool `codec:"Allow_chflags"` Allow_mount bool `codec:"Allow_mount"` Allow_mount_devfs bool `codec:"Allow_mount.devfs"` Allow_quotas bool `codec:"Allow_quotas"` Allow_read_msgbuf bool `codec:"Allow_read_msgbuf"` Allow_socket_af bool `codec:"Allow_socket_af"` Allow_reserved_ports bool `codec:"Allow_reserved_ports"` Allow_mlock bool `codec:"Allow_mlock"` Allow_mount_fdescfs bool `codec:"Allow_mount_fdescfs"` Allow_mount_fusefs bool `codec:"Allow_mount_fusefs"` Allow_mount_nullfs bool `codec:"Allow_mount_nullfs"` Allow_mount_procfs bool `codec:"Allow_mount_procfs"` Allow_mount_linprocfs bool `codec:"Allow_mount_linprocfs"` Allow_mount_linsysfs bool `codec:"Allow_mount_linsysfs"` Allow_mount_tmpfs bool `codec:"Allow_mount_tmpfs"` Allow_mount_zfs bool `codec:"Allow_mount_zfs"` Allow_vmm bool `codec:"Allow_vmm"` Linux string `codec:"Linux"` Linux_osname string `codec:"Linux_osname"` Linux_osrelease string `codec:"Linux_osrelease"` Linux_oss_version string `codec:"Linux_oss_version"` Sysvmsg string `codec:"Sysvmsg"` Sysvsem string `codec:"Sysvsem"` Sysvshm string `codec:"Sysvshm"` Exec_prestart string `codec:"Exec_prestart"` Exec_prestop string `codec:"Exec_prestop"` Exec_created string `codec:"Exec_created"` Exec_start string `codec:"Exec_start"` Exec_stop string `codec:"Exec_stop"` Command string `codec:"Command"` Exec_poststart string `codec:"Exec_postart"` Exec_poststop string `codec:"Exec_poststop"` Exec_clean bool `codec:"Exec_clean"` Exec_jail_user string `codec:"Exec_jail_user"` Exec_system_jail_user string `codec:"Exec_system_jail_user"` Exec_system_user string `codec:"Exec_system_user"` Exec_timeout uint `codec:"Exec_timeout"` Exec_consolelog string `codec:"Exec_consolelog"` Exec_fib string `codec:"Exec_fib"` Stop_timeout uint `codec:"Stop_timeout"` Nic string `codec:"Nic"` Vnet_nic string `codec:"Vnet_nic"` Ip_hostname string `codec:"Ip_hostname"` Mount bool `codec:"Mount"` Mount_fstab string `codec:"Mount_fstab"` Mount_devfs bool `codec:"Mount_devfs"` Mount_fdescfs bool `codec:"Mount_fdescfs"` Depend string `codec:"Depend"` Rctl Rctl `codec:"Rctl"` }
TaskConfig is the driver configuration of a task within a job
Click to show internal directories.
Click to hide internal directories.