runfileconfig

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogWriter

func GetLogWriter(fileLogWriterCloser io.WriteCloser, logDestination standalone.LogDestType) io.Writer

GetLogWriter returns the log writer based on the log destination.

Types

type App

type App struct {
	standalone.RunConfig   `yaml:",inline"`
	ContainerConfiguration `yaml:",inline"`
	AppDirPath             string `yaml:"appDirPath"`
	AppLogFileName         string
	DaprdLogFileName       string
	AppLogWriteCloser      io.WriteCloser
	DaprdLogWriteCloser    io.WriteCloser
}

App represents the configuration options for the apps in the run file.

func (*App) CloseAppLogFile

func (a *App) CloseAppLogFile() error

func (*App) CloseDaprdLogFile

func (a *App) CloseDaprdLogFile() error

func (*App) CreateAppLogFile

func (a *App) CreateAppLogFile() error

CreateAppLogFile creates the log file, sets internal file handle and returns error if any.

func (*App) CreateDaprdLogFile

func (a *App) CreateDaprdLogFile() error

CreateDaprdLogFile creates the log file, sets internal file handle and returns error if any.

func (*App) GetDeployDir

func (a *App) GetDeployDir() string

func (*App) GetLogsDir

func (a *App) GetLogsDir() string

type Common

type Common struct {
	standalone.SharedRunConfig `yaml:",inline"`
}

Common represents the configuration options for the common section in the run file.

type ContainerConfiguration

type ContainerConfiguration struct {
	ContainerImage string `yaml:"containerImage"`
	CreateService  bool   `yaml:"createService"`
}

ContainerConfiguration represents the application container configuration parameters.

type RunFileConfig

type RunFileConfig struct {
	Common  Common `yaml:"common"`
	Apps    []App  `yaml:"apps"`
	Version int    `yaml:"version"`
	Name    string `yaml:"name,omitempty"`
}

RunFileConfig represents the complete configuration options for the run file. It is meant to be used with - "dapr run --run-file <path-to-run-file>" command.

func (*RunFileConfig) GetApps

func (a *RunFileConfig) GetApps(runFilePath string) ([]App, error)

GetApps orchestrates the parsing of supplied run file, validating fields and consolidating SharedRunConfig for the apps. It returns a list of apps with the merged values for the SharedRunConfig from common section of the YAML file.

Jump to

Keyboard shortcuts

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