Documentation
¶
Index ¶
- func NewTestDaemonConfig(t *testing.T, baseDir string, opts ...DaemonConfigOption) *config.DaemonConfig
- func NewTestServiceConfigFile(t *testing.T, opts ...ServiceConfigOption) *types.ServiceConfig
- func NewTestServiceScriptAtLocation(t *testing.T, testServiceScript ServiceScriptSetup)
- func SetupTestDB(t *testing.T, migrationsFS embed.FS, migrationsPath string) (*database.DB, *sql.DB, string)
- type DaemonConfigOption
- func WithFileSizeLimit(fileSizeLimit int64) DaemonConfigOption
- func WithLogDir(logDir string) DaemonConfigOption
- func WithLogFilename(logFilename string) DaemonConfigOption
- func WithMaxFiles(maxFiles int) DaemonConfigOption
- func WithPIDFile(pidFile string) DaemonConfigOption
- func WithSocketPath(socketPath string) DaemonConfigOption
- type ServiceConfigOption
- func WithCommand(command string) ServiceConfigOption
- func WithEnvFile(envFile string) ServiceConfigOption
- func WithName(name string) ServiceConfigOption
- func WithPort(port int) ServiceConfigOption
- func WithRuntime(runtimeType string, path string) ServiceConfigOption
- func WithRuntimePath(path string) ServiceConfigOption
- func WithRuntimeType(runtimeType string) ServiceConfigOption
- func WithoutRuntime() ServiceConfigOption
- type ServiceScriptOption
- type ServiceScriptSetup
- type TestLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestDaemonConfig ¶
func NewTestDaemonConfig(t *testing.T, baseDir string, opts ...DaemonConfigOption) *config.DaemonConfig
func NewTestServiceConfigFile ¶
func NewTestServiceConfigFile(t *testing.T, opts ...ServiceConfigOption) *types.ServiceConfig
func NewTestServiceScriptAtLocation ¶
func NewTestServiceScriptAtLocation(t *testing.T, testServiceScript ServiceScriptSetup)
Types ¶
type DaemonConfigOption ¶
type DaemonConfigOption func(*config.DaemonConfig)
func WithFileSizeLimit ¶
func WithFileSizeLimit(fileSizeLimit int64) DaemonConfigOption
func WithLogDir ¶
func WithLogDir(logDir string) DaemonConfigOption
func WithLogFilename ¶
func WithLogFilename(logFilename string) DaemonConfigOption
func WithMaxFiles ¶
func WithMaxFiles(maxFiles int) DaemonConfigOption
func WithPIDFile ¶
func WithPIDFile(pidFile string) DaemonConfigOption
func WithSocketPath ¶
func WithSocketPath(socketPath string) DaemonConfigOption
type ServiceConfigOption ¶
type ServiceConfigOption func(*types.ServiceConfig)
func WithCommand ¶
func WithCommand(command string) ServiceConfigOption
func WithEnvFile ¶
func WithEnvFile(envFile string) ServiceConfigOption
func WithName ¶
func WithName(name string) ServiceConfigOption
func WithPort ¶
func WithPort(port int) ServiceConfigOption
func WithRuntime ¶
func WithRuntime(runtimeType string, path string) ServiceConfigOption
func WithRuntimePath ¶
func WithRuntimePath(path string) ServiceConfigOption
func WithRuntimeType ¶
func WithRuntimeType(runtimeType string) ServiceConfigOption
func WithoutRuntime ¶
func WithoutRuntime() ServiceConfigOption
type ServiceScriptOption ¶
type ServiceScriptOption func(*ServiceScriptSetup)
func WithDirPath ¶
func WithDirPath(dirPath string) ServiceScriptOption
func WithFileName ¶
func WithFileName(fileName string) ServiceScriptOption
func WithScript ¶
func WithScript(script string) ServiceScriptOption
type ServiceScriptSetup ¶
type ServiceScriptSetup struct {
Script string `yaml:"script"`
DirPath string `json:"dir_path" yaml:"dir_path"`
FileName string `json:"file_name" yaml:"file_name"`
}
func NewTestServiceScript ¶
func NewTestServiceScript(t *testing.T, opts ...ServiceScriptOption) *ServiceScriptSetup
type TestLogger ¶
type TestLogger struct {
// contains filtered or unexported fields
}
func NewTestLogger ¶
func NewTestLogger(t *testing.T) *TestLogger
Click to show internal directories.
Click to hide internal directories.