...

Package jvmchaos

import "github.com/chaos-mesh/chaos-mesh/controllers/chaosimpl/jvmchaos"
Overview
Index

Overview ▾

Constants

const CommonRuleTemplate = `
RULE {{.Name}}
CLASS {{.Class}}
METHOD {{.Method}}
AT ENTRY
IF true
DO
    {{.Do}};
ENDRULE
`
const GcRuleTemplate = `
RULE {{.Name}}
GC
ENDRULE
`
const StressRuleTemplate = `
RULE {{.Name}}
STRESS {{.StressType}}
{{.StressValueName}} {{.StressValue}}
ENDRULE
`

Variables

var Module = fx.Provide(
    fx.Annotated{
        Group:  "impl",
        Target: NewImpl,
    },
)

func NewImpl

func NewImpl(c client.Client, log logr.Logger, decoder *utils.ContainerRecordDecoder) *impltypes.ChaosImplPair

Object would return the instance of chaos

type Impl

type Impl struct {
    client.Client
    Log logr.Logger
    // contains filtered or unexported fields
}

func (*Impl) Apply

func (impl *Impl) Apply(ctx context.Context, index int, records []*v1alpha1.Record, obj v1alpha1.InnerObject) (v1alpha1.Phase, error)

Apply applies jvm-chaos

func (*Impl) Recover

func (impl *Impl) Recover(ctx context.Context, index int, records []*v1alpha1.Record, obj v1alpha1.InnerObject) (v1alpha1.Phase, error)

Recover means the reconciler recovers the chaos action

type JVMRuleParameter

JVMRuleParameter is only used to generate rule data

type JVMRuleParameter struct {
    v1alpha1.JVMParameter

    StressType      string
    StressValue     string
    StressValueName string
    Do              string
}