func (c *Fake) ClearActions() {
	c.Lock()
	defer c.Unlock()
	c.actions = make([]Action, 0)
}
ClearActions clears the history of actions called on the fake client.
package testing
import (
	"fmt"
	"sync"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/watch"
	restclient "k8s.io/client-go/rest"
)
type Fake struct {
	sync.RWMutex
	actions []Action  
	ReactionChain []Reactor
	WatchReactionChain []WatchReactor
	ProxyReactionChain []ProxyReactor
	Resources []*metav1.APIResourceList
}
type Reactor interface {
	Handles(action Action) bool
	React(action Action) (handled bool, ret runtime.Object, err error)
}
type WatchReactor interface {
	Handles(action Action) bool
	React(action Action) (handled bool, ret watch.Interface, err error)
}
type ProxyReactor interface {
	Handles(action Action) bool
	React(action Action) (handled bool, ret restclient.ResponseWrapper, err error)
}
type ReactionFunc func(action Action) (handled bool, ret runtime.Object, err error)
type WatchReactionFunc func(action Action) (handled bool, ret watch.Interface, err error)
type ProxyReactionFunc func(action Action) (handled bool, ret restclient.ResponseWrapper, err error)
func (c *Fake) AddReactor(verb, resource string, reaction ReactionFunc) {
	c.ReactionChain = append(c.ReactionChain, &SimpleReactor{verb, resource, reaction})
}
func (c *Fake) PrependReactor(verb, resource string, reaction ReactionFunc) {
	c.ReactionChain = append([]Reactor{&SimpleReactor{verb, resource, reaction}}, c.ReactionChain...)
}
func (c *Fake) AddWatchReactor(resource string, reaction WatchReactionFunc) {
	c.WatchReactionChain = append(c.WatchReactionChain, &SimpleWatchReactor{resource, reaction})
}
func (c *Fake) PrependWatchReactor(resource string, reaction WatchReactionFunc) {
	c.WatchReactionChain = append([]WatchReactor{&SimpleWatchReactor{resource, reaction}}, c.WatchReactionChain...)
}
func (c *Fake) AddProxyReactor(resource string, reaction ProxyReactionFunc) {
	c.ProxyReactionChain = append(c.ProxyReactionChain, &SimpleProxyReactor{resource, reaction})
}
func (c *Fake) PrependProxyReactor(resource string, reaction ProxyReactionFunc) {
	c.ProxyReactionChain = append([]ProxyReactor{&SimpleProxyReactor{resource, reaction}}, c.ProxyReactionChain...)
}
func (c *Fake) Invokes(action Action, defaultReturnObj runtime.Object) (runtime.Object, error) {
	c.Lock()
	defer c.Unlock()
	c.actions = append(c.actions, action)
	for _, reactor := range c.ReactionChain {
		if !reactor.Handles(action) {
			continue
		}
		handled, ret, err := reactor.React(action)
		if !handled {
			continue
		}
		return ret, err
	}
	return defaultReturnObj, nil
}
func (c *Fake) InvokesWatch(action Action) (watch.Interface, error) {
	c.Lock()
	defer c.Unlock()
	c.actions = append(c.actions, action)
	for _, reactor := range c.WatchReactionChain {
		if !reactor.Handles(action) {
			continue
		}
		handled, ret, err := reactor.React(action)
		if !handled {
			continue
		}
		return ret, err
	}
	return nil, fmt.Errorf("unhandled watch: %#v", action)
}
func (c *Fake) InvokesProxy(action Action) restclient.ResponseWrapper {
	c.Lock()
	defer c.Unlock()
	c.actions = append(c.actions, action)
	for _, reactor := range c.ProxyReactionChain {
		if !reactor.Handles(action) {
			continue
		}
		handled, ret, err := reactor.React(action)
		if !handled || err != nil {
			continue
		}
		return ret
	}
	return nil
}