...

Package chaosdaemon

import "github.com/chaos-mesh/chaos-mesh/controllers/utils/chaosdaemon"
Overview
Index

Overview ▾

type ChaosDaemonClientBuilder

type ChaosDaemonClientBuilder struct {
    client.Reader
}

func New

func New(params ChaosDaemonClientBuilderParams) *ChaosDaemonClientBuilder

func (*ChaosDaemonClientBuilder) Build

func (b *ChaosDaemonClientBuilder) Build(ctx context.Context, pod *v1.Pod, id *types.NamespacedName) (chaosdaemonclient.ChaosDaemonClientInterface, error)

Build will construct a ChaosDaemonClient The `id` parameter is the namespacedName of current handling resource, which will be printed in the log of the chaos-daemon

func (*ChaosDaemonClientBuilder) FindDaemonIP

func (b *ChaosDaemonClientBuilder) FindDaemonIP(ctx context.Context, pod *v1.Pod) (string, error)

type ChaosDaemonClientBuilderParams

type ChaosDaemonClientBuilderParams struct {
    fx.In

    NoCacheReader           client.Reader `name:"no-cache"`
    ControlPlaneCacheReader client.Reader `name:"control-plane-cache" optional:"true"`
}