Documentation ¶
Index ¶
- Constants
- func BuildConfigManagerContainerArgs(reloadOptions *appsv1alpha1.ReloadOptions, volumeDirs []corev1.VolumeMount, ...) error
- func IsSupportReload(reload *appsv1alpha1.ReloadOptions) bool
- func IsValidUnixSignal(sig appsv1alpha1.SignalType) bool
- func SetLogger(zapLogger *zap.Logger)
- func ValidateReloadOptions(reloadOptions *appsv1alpha1.ReloadOptions, cli client.Client, ...) error
- type CfgManagerBuildParams
- type ConfigMapVolumeWatcher
- func (w *ConfigMapVolumeWatcher) AddFilter(filter NotifyEventFilter) *ConfigMapVolumeWatcher
- func (w *ConfigMapVolumeWatcher) AddHandler(handler WatchEventHandler) *ConfigMapVolumeWatcher
- func (w *ConfigMapVolumeWatcher) Close() error
- func (w *ConfigMapVolumeWatcher) Run() error
- func (w *ConfigMapVolumeWatcher) SetRetryCount(count int) *ConfigMapVolumeWatcher
- type DynamicParamUpdater
- type DynamicUpdater
- type NotifyEventFilter
- type PID
- type WatchEventHandler
Constants ¶
View Source
const ( DefaultRetryCount = 3 DefaultSleepRetryTime = 10 )
Variables ¶
This section is empty.
Functions ¶
func BuildConfigManagerContainerArgs ¶
func BuildConfigManagerContainerArgs(reloadOptions *appsv1alpha1.ReloadOptions, volumeDirs []corev1.VolumeMount, cli client.Client, ctx context.Context, manager *CfgManagerBuildParams, formatterConfig *appsv1alpha1.FormatterConfig) error
func IsSupportReload ¶
func IsSupportReload(reload *appsv1alpha1.ReloadOptions) bool
func IsValidUnixSignal ¶
func IsValidUnixSignal(sig appsv1alpha1.SignalType) bool
func ValidateReloadOptions ¶
func ValidateReloadOptions(reloadOptions *appsv1alpha1.ReloadOptions, cli client.Client, ctx context.Context) error
Types ¶
type CfgManagerBuildParams ¶
type CfgManagerBuildParams struct { ManagerName string `json:"name"` Image string `json:"sidecarImage"` Args []string `json:"args"` Envs []corev1.EnvVar `json:"envs"` Volumes []corev1.VolumeMount `json:"volumes"` CharacterType string `json:"characterType"` SecreteName string `json:"secreteName"` // add volume to pod ScriptVolume *corev1.Volume Cluster *appsv1alpha1.Cluster }
CfgManagerBuildParams is the params for building config manager sidecar
type ConfigMapVolumeWatcher ¶
type ConfigMapVolumeWatcher struct {
// contains filtered or unexported fields
}
func NewVolumeWatcher ¶
func NewVolumeWatcher(volume []string, ctx context.Context, logger *zap.SugaredLogger) *ConfigMapVolumeWatcher
func (*ConfigMapVolumeWatcher) AddFilter ¶
func (w *ConfigMapVolumeWatcher) AddFilter(filter NotifyEventFilter) *ConfigMapVolumeWatcher
func (*ConfigMapVolumeWatcher) AddHandler ¶
func (w *ConfigMapVolumeWatcher) AddHandler(handler WatchEventHandler) *ConfigMapVolumeWatcher
func (*ConfigMapVolumeWatcher) Close ¶
func (w *ConfigMapVolumeWatcher) Close() error
func (*ConfigMapVolumeWatcher) Run ¶
func (w *ConfigMapVolumeWatcher) Run() error
func (*ConfigMapVolumeWatcher) SetRetryCount ¶
func (w *ConfigMapVolumeWatcher) SetRetryCount(count int) *ConfigMapVolumeWatcher
type DynamicParamUpdater ¶
type DynamicParamUpdater interface { ExecCommand(ctx context.Context, command string, args ...string) (string, error) Close() }
DynamicParamUpdater is designed to adapt to the dapper implementation.
func NewCommandChannel ¶
func NewCommandChannel(ctx context.Context, dataType, dsn string) (DynamicParamUpdater, error)
func NewMysqlConnection ¶
func NewMysqlConnection(ctx context.Context, dsn string) (DynamicParamUpdater, error)
func NewPGPatroniConnection ¶
func NewPGPatroniConnection(hostURL string) (DynamicParamUpdater, error)
type DynamicUpdater ¶
func OnlineUpdateParamsHandle ¶
func OnlineUpdateParamsHandle(tplScriptPath string, formatConfig *appsv1alpha1.FormatterConfig, dataType, dsn string) (DynamicUpdater, error)
type NotifyEventFilter ¶
func CreateCfgRegexFilter ¶
func CreateCfgRegexFilter(regexString string) (NotifyEventFilter, error)
func CreateValidConfigMapFilter ¶
func CreateValidConfigMapFilter() NotifyEventFilter
CreateValidConfigMapFilter processes configmap volume https://github.com/ossrs/srs/issues/1635
type WatchEventHandler ¶
func CreateExecHandler ¶
func CreateExecHandler(command string) (WatchEventHandler, error)
func CreateSignalHandler ¶
func CreateSignalHandler(sig appsv1alpha1.SignalType, processName string) (WatchEventHandler, error)
func CreateTPLScriptHandler ¶
func CreateTPLScriptHandler(tplScripts string, dirs []string, fileRegex string, backupPath string, formatConfig *appsv1alpha1.FormatterConfig, dataType string, dsn string) (WatchEventHandler, error)
Click to show internal directories.
Click to hide internal directories.