mysql

package
v0.2.1-0...-d023f04 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

Driver is a driver for running images via Java

func NewDriver

func NewDriver(logger g.LoggerType) *Driver

func (*Driver) Capabilities

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

func (*Driver) ConfigSchema

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

func (*Driver) DestroyTask

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

func (*Driver) ExecTask

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

func (*Driver) Fingerprint

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

func (*Driver) GetDriverConfig

func (d *Driver) GetDriverConfig() *DriverConfig

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) ResetDebugJob

func (d *Driver) ResetDebugJob(job *string) string

func (*Driver) SetConfig

func (d *Driver) SetConfig(c *base.Config) (err error)

func (*Driver) SetLogLevel

func (d *Driver) SetLogLevel(level string) error

func (*Driver) SetSetupApiServerFn

func (d *Driver) SetSetupApiServerFn(fn func(logger g.LoggerType, driverConfig *DriverConfig) (err error))

func (*Driver) SetupNatsServer

func (d *Driver) SetupNatsServer(logger g.LoggerType) (err error)

func (*Driver) Shutdown

func (d *Driver) Shutdown()

func (*Driver) SignalTask

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

func (*Driver) StartTask

func (*Driver) StopTask

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

StopTask will not be called if the task has already exited (e.g. onError).

func (*Driver) TaskConfigSchema

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

func (*Driver) TaskEvents

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

func (*Driver) TaskStats

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

func (*Driver) WaitTask

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

type DriverConfig

type DriverConfig struct {
	NatsBind                string `codec:"nats_bind"`
	NatsAdvertise           string `codec:"nats_advertise"`
	BigTxMaxJobs            int32  `codec:"big_tx_max_jobs"`
	ApiAddr                 string `codec:"api_addr"`
	NomadAddr               string `codec:"nomad_addr"`
	Consul                  string `codec:"consul"`
	DataDir                 string `codec:"data_dir"`
	StatsCollectionInterval int    `codec:"stats_collection_interval"`
	PublishMetrics          bool   `codec:"publish_metrics"`
	LogLevel                string `codec:"log_level"`
	DebugJob                string `codec:"debug_job"`
	LogFile                 string `codec:"log_file"`
	UiDir                   string `codec:"ui_dir"`
	RsaPrivateKeyPath       string `codec:"rsa_private_key_path"`
	CertFilePath            string `codec:"cert_file_path"`
	KeyFilePath             string `codec:"key_file_path"`
	Memory                  string `codec:"memory"`
}

type DriverHandle

type DriverHandle interface {
	Run()

	// Shutdown is used to stop the task.
	// Do not send ExitResult in Shutdown().
	// pause API will call Shutdown and the task should not exit.
	Shutdown() error

	// Stats returns aggregated stats of the driver
	Stats() (*common.TaskStatistics, error)

	Finish1() error
}

type TaskState

type TaskState struct {
	TaskConfig     *drivers.TaskConfig
	DtleTaskConfig *common.DtleTaskConfig
	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.

type TaskStoreForApi

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

used by http api

var AllocIdTaskNameToTaskHandler *TaskStoreForApi

used by http api

func (*TaskStoreForApi) Delete

func (ts *TaskStoreForApi) Delete(id string)

func (*TaskStoreForApi) Set

func (ts *TaskStoreForApi) Set(allocId, taskName, taskId string, handle *taskHandle)

it can only use allocId and taskName to identify the task from http api but internal operation like deleting task need taskId to identify the task

Directories

Path Synopsis
sql
oracle

Jump to

Keyboard shortcuts

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