Package netem

import "github.com/chaos-mesh/chaos-mesh/pkg/chaosdaemon/netem"

Overview ▾

func MergeNetem

func MergeNetem(a, b *chaosdaemon.Netem) *chaosdaemon.Netem

MergeNetem merges two Netem protos into a new one. REMEMBER to assign the return value, i.e. merged = utils.MergeNetm(merged, em) For each field it takes the bigger value of the two. Its main use case is merging netem of different types, e.g. delay and loss. It returns nil if both inputs are nil. Otherwise it returns a new Netem with merged values.