Documentation
¶
Index ¶
- Variables
- func CheckDotnetVersionInfo(config *Config) (version string, err error)
- func GetRuntimeVersions(config *Config) (runtimeVersions []string, err error)
- func MergeConfigs(dest, src any) error
- func NewDriver(ctx context.Context, logger hclog.Logger) drivers.DriverPlugin
- type Config
- type ConfigFile
- 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) ExecTaskStreamingRaw(ctx context.Context, taskID string, command []string, tty bool, ...) 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) 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 GcConfig
- type GlobalizationConfig
- type TaskConfig
- type TaskState
- type ThreadingConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PluginID is the dotnet plugin metadata registered in the plugin // catalog. PluginID = loader.PluginID{ Name: pluginName, PluginType: base.PluginTypeDriver, } // PluginConfig is the dotnet driver factory function registered in the // plugin catalog. PluginConfig = &loader.InternalPluginConfig{ Config: map[string]interface{}{}, Factory: func(ctx context.Context, l hclog.Logger) interface{} { return NewDriver(ctx, l) }, } )
Functions ¶
func CheckDotnetVersionInfo ¶
func GetRuntimeVersions ¶
func MergeConfigs ¶
Types ¶
type Config ¶
type Config struct { // DefaultModePID is the default PID isolation set for all tasks using // exec-based task drivers. DefaultModePID string `codec:"default_pid_mode"` // DefaultModeIPC is the default IPC isolation set for all tasks using // exec-based task drivers. DefaultModeIPC string `codec:"default_ipc_mode"` // AllowCaps configures which Linux Capabilities are enabled for tasks // running on this node. AllowCaps []string `codec:"allow_caps"` // SdkPath configures the path to the dotnet SDK binary (dotnet) SdkPath string `codec:"sdk_path"` // RuntimeVersions is the list of detected .NET runtime versions. RuntimeVersions []string `codec:"runtime_versions"` }
Config is the driver configuration set by the SetConfig RPC call
type ConfigFile ¶
type ConfigFile struct { RuntimeOptions struct { Tfm string `json:"tfm,omitempty"` Framework struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` } `json:"framework"` ConfigProperties struct { Enable *bool `json:"System.GC.Server,omitempty"` Concurrent *bool `json:"System.GC.Concurrent,omitempty"` LatencyMode *int `json:"System.GC.LatencyMode,omitempty"` ForceCompact *bool `json:"System.GC.ForceCompact,omitempty"` TrimCommit *bool `json:"System.GC.TrimCommit,omitempty"` CompactOnBackgroundThread *bool `json:"System.GC.CompactOnBackgroundThread,omitempty"` RegionSize *int64 `json:"System.GC.RegionSize,omitempty"` AllowVeryLargeObjects *bool `json:"System.GC.AllowVeryLargeObjects,omitempty"` ServerHeapAffinitizeMask *uint64 `json:"System.GC.ServerHeapAffinitizeMask,omitempty"` HeapCount *uint16 `json:"System.GC.HeapCount,omitempty"` HeapHardLimit *uint64 `json:"System.GC.HeapHardLimit,omitempty,"` HeapHardLimitPercent *uint8 `json:"System.GC.HeapHardLimitPercent,omitempty"` NoAffinity *bool `json:"System.GC.NoAffinitize,omitempty"` HeapAffinityMask *uint16 `json:"System.GC.HeapAffinitizeMask,omitempty"` HeapAffinityRanges *string `json:"System.GC.HeapAffinitizeRanges,omitempty"` CpuGroup *bool `json:"System.GC.CpuGroup,omitempty"` HighMemPercent *uint8 `json:"System.GC.HighMemPercent,omitempty"` RetainVM *bool `json:"System.GC.RetainVM,omitempty"` InvariantCulture *bool `json:"System.Globalization.InvariantCulture,omitempty"` UseNls *bool `json:"System.Globalization.UseNls,omitempty"` PreferSystemLibraries *bool `json:"System.Globalization.PreferSystemLibraries,omitempty"` GlobalizationInvariant *bool `json:"System.Globalization.Invariant,omitempty"` PredefinedCulturesOnly *bool `json:"System.Globalization.PredefinedCulturesOnly,omitempty"` ThreadPoolMinThreads *uint32 `json:"System.Threading.ThreadPool.MinThreads,omitempty"` ThreadPoolMaxThreads *uint32 `json:"System.Threading.ThreadPool.MaxThreads,omitempty"` ThreadPoolMinIOCompletionThreads *int `json:"System.Threading.ThreadPool.MinIOCompletionThreads,omitempty"` ThreadPoolMaxIOCompletionThreads *int `json:"System.Threading.ThreadPool.MaxIOCompletionThreads,omitempty"` ThreadPoolUnfairSemaphoreSpinLimit *int `json:"System.Threading.ThreadPool.UnfairSemaphoreSpinLimit,omitempty"` ThreadUseAllCpuGroups *bool `json:"System.Threading.UseAllCpuGroups,omitempty"` UseWindowsThreadPool *bool `json:"System.Threading.ThreadPool.UseWindowsThreadPool,omitempty"` AutoReleasePoolSupport *bool `json:"System.Threading.Thread.EnableAutoreleasePool,omitempty"` StartupHook *string `json:"System.StartupHook,omitempty"` UseReadyToRun *bool `json:"System.Runtime.UseReadyToRun,omitempty"` UseTieredCompilation *bool `json:"System.Runtime.TieredCompilation,omitempty"` TieredCompilationQuickJit *bool `json:"System.Runtime.TieredCompilation.QuickJit,omitempty"` TieredCompilationQuickJitForLoops *bool `json:"System.Runtime.TieredCompilation.QuickJitForLoops,omitempty"` DisableJitOptimizations *bool `json:"System.Runtime.DisableJitOptimizations,omitempty"` EnableDiagnostics *bool `json:"System.Runtime.EnableDiagnostics,omitempty"` MaxStackSize *int64 `json:"System.Runtime.MaxStackSize,omitempty"` DefaultTimeZone *string `json:"System.Runtime.DefaultTimeZone,omitempty"` AssemblyLoadNoOptimizations *bool `json:"System.Runtime.Loader.AssemblyLoadNoOptimizations,omitempty"` EnableAssemblyLoadContextRedirection *bool `json:"System.Runtime.Loader.EnableAssemblyLoadContextRedirection,omitempty"` MetaDataUpdaterSupport *bool `json:"System.Reflection.Metadata.MetadataUpdater.IsSupported,omitempty"` } `json:"configProperties"` } `json:"runtimeOptions"` }
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is a driver for running images via Dotnet
func (*Driver) Capabilities ¶
func (d *Driver) Capabilities() (*drivers.Capabilities, error)
func (*Driver) ExecTaskStreamingRaw ¶
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 GcConfig ¶
type GcConfig struct { Enable *bool `codec:"enable"` Concurrent *bool `codec:"concurrent"` HeapCount *uint16 `codec:"heap_count"` HeapHardLimit *uint64 `codec:"heap_limit"` HeapHardLimitPercent *uint8 `codec:"heap_limit_percent"` NoAffinity *bool `codec:"no_affinity"` HeapAffinityMask *uint16 `codec:"heap_affinity_mask"` HeapAffinityRanges *string `codec:"heap_affinity_ranges"` CpuGroup *bool `codec:"cpu_group"` HighMemPercent *uint8 `codec:"high_mem_percent"` RetainVM *bool `codec:"retain_vm"` }
type GlobalizationConfig ¶
type TaskConfig ¶
type TaskConfig struct { // DotnetPath indicates where a dll file is found. DotnetPath string `codec:"dll_path"` // SdkVersion indicates which version of dotnet the task must be run RuntimeVersion *string `codec:"runtime_version"` // RuntimeOptions are arguments to pass to the dotnet GC *GcConfig `codec:"gc"` Globalization *GlobalizationConfig `codec:"globalization"` Threading *ThreadingConfig `codec:"threading"` // Args are extra arguments to dotnet executable Args []string `codec:"args"` // ModePID indicates whether PID namespace isolation is enabled for the task. // Must be "private" or "host" if set. ModePID string `codec:"pid_mode"` // ModeIPC indicates whether IPC namespace isolation is enabled for the task. // Must be "private" or "host" if set. ModeIPC string `codec:"ipc_mode"` // CapAdd is a set of linux capabilities to enable. CapAdd []string `codec:"cap_add"` // CapDrop is a set of linux capabilities to disable. CapDrop []string `codec:"cap_drop"` }
TaskConfig is the driver configuration of a taskConfig within a job
type TaskState ¶
type TaskState struct { ReattachConfig *pstructs.ReattachConfig TaskConfig *drivers.TaskConfig Pid int StartedAt time.Time }
TaskState is the state which is encoded in the handle returned in StartTask. This information is needed to rebuild the taskConfig state and handler during recovery.
Click to show internal directories.
Click to hide internal directories.