MCPcopy Create free account
hub / github.com/flant/shell-operator / ExecuteOperations

Method ExecuteOperations

pkg/kube/object_patch/patch.go:46–60  ·  view source on GitHub ↗
(ops []sdkpkg.PatchCollectorOperation)

Source from the content-addressed store, hash-verified

44}
45
46func (o *ObjectPatcher) ExecuteOperations(ops []sdkpkg.PatchCollectorOperation) error {
47 log.Debug("Starting execute operations process")
48 defer log.Debug("Finished execute operations process")
49
50 applyErrors := &multierror.Error{}
51 for _, op := range ops {
52 log.Debug("Applying operation", slog.String(pkg.LogKeyName, op.Description()))
53 if err := o.ExecuteOperation(op); err != nil {
54 err = gerror.WithMessage(err, op.Description())
55 applyErrors = multierror.Append(applyErrors, err)
56 }
57 }
58
59 return applyErrors.ErrorOrNil()
60}
61
62func (o *ObjectPatcher) ExecuteOperation(operation sdkpkg.PatchCollectorOperation) error {
63 if operation == nil {

Callers 4

Test_PatchOperationsFunction · 0.95
Test_CreateOperationsFunction · 0.95
Test_DeleteOperationsFunction · 0.95
handleRunHookMethod · 0.80

Calls 3

ExecuteOperationMethod · 0.95
StringMethod · 0.45
DescriptionMethod · 0.45

Tested by 3

Test_PatchOperationsFunction · 0.76
Test_CreateOperationsFunction · 0.76
Test_DeleteOperationsFunction · 0.76