func (l MemberStatusList) update(m MemberStatus) error {
	for i, x := range l {
		if x.ID == m.ID {
			l[i] = m
			return nil
		}
	}
	return errors.WithStack(errors.Wrapf(NotFoundError, "Member '%s' is not a member", m.ID))
}
Update a member in the list.
Returns a NotFoundError if the ID of the given member cannot be found.
package v2alpha1
import (
	"math/rand"
	"sort"
	"time"
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
	v1 "k8s.io/api/core/v1"
)
type MemberStatusList []MemberStatus
func (l MemberStatusList) Equal(other MemberStatusList) bool {
	if len(l) != len(other) {
		return false
	}
	for i := 0; i < len(l); i++ {
		o, found := other.ElementByID(l[i].ID)
		if !found {
			return false
		}
		if !l[i].Equal(o) {
			return false
		}
	}
	return true
}
func (l MemberStatusList) ContainsID(id string) bool {
	for _, x := range l {
		if x.ID == id {
			return true
		}
	}
	return false
}
func (l MemberStatusList) ElementByID(id string) (MemberStatus, bool) {
	for i, x := range l {
		if x.ID == id {
			return l[i], true
		}
	}
	return MemberStatus{}, false
}
func (l MemberStatusList) ElementByPodName(podName string) (MemberStatus, bool) {
	for i, x := range l {
		if x.PodName == podName {
			return l[i], true
		}
	}
	return MemberStatus{}, false
}
func (l MemberStatusList) ElementByPVCName(pvcName string) (MemberStatus, bool) {
	for i, x := range l {
		if x.PersistentVolumeClaimName == pvcName {
			return l[i], true
		}
	}
	return MemberStatus{}, false
}
func (l *MemberStatusList) add(m MemberStatus) error {
	src := *l
	for _, x := range src {
		if x.ID == m.ID {
			return errors.WithStack(errors.Wrapf(AlreadyExistsError, "Member '%s' already exists", m.ID))
		}
	}
	newList := append(src, m)
	sort.Slice(newList, func(i, j int) bool { return newList[i].ID < newList[j].ID })
	*l = newList
	return nil
}