Documentation ¶
Index ¶
- Constants
- func ErrorCode(err error) codes.Code
- func ErrorDesc(err error) string
- func PollFunc(clockSource *fakeclock.FakeClock, f func() error) error
- func PollFuncWithTimeout(clockSource *fakeclock.FakeClock, f func() error, timeout time.Duration) error
- type FakeCompatPlugin
- func (f *FakeCompatPlugin) Addr() net.Addr
- func (f *FakeCompatPlugin) Client() *plugins.Client
- func (f *FakeCompatPlugin) IsV1() bool
- func (f *FakeCompatPlugin) Name() string
- func (f *FakeCompatPlugin) Protocol() string
- func (f *FakeCompatPlugin) ScopedPath(path string) string
- func (f *FakeCompatPlugin) Timeout() time.Duration
- type FakePluginGetter
- func (f *FakePluginGetter) Get(name, capability string, _ int) (plugingetter.CompatPlugin, error)
- func (f *FakePluginGetter) GetAllByCap(_ string) ([]plugingetter.CompatPlugin, error)
- func (f *FakePluginGetter) GetAllManagedPluginsByCap(capability string) []plugingetter.CompatPlugin
- func (f *FakePluginGetter) Handle(_ string, _ func(string, *plugins.Client))
Constants ¶
View Source
const DockerCSIPluginControllerCap = "csicontroller"
View Source
const DockerCSIPluginNodeCap = "csinode"
Variables ¶
This section is empty.
Functions ¶
func ErrorCode ¶
ErrorCode returns the error code for err if it was produced by the rpc system. Otherwise, it returns codes.Unknown.
func ErrorDesc ¶
ErrorDesc returns the error description of err if it was produced by the rpc system. Otherwise, it returns err.Error() or empty string when err is nil.
Types ¶
type FakeCompatPlugin ¶
fakeCompatPlugin is a fake implementing the plugingetter.CompatPlugin and plugingetter.PluginAddr interfaces
func (*FakeCompatPlugin) Addr ¶
func (f *FakeCompatPlugin) Addr() net.Addr
func (*FakeCompatPlugin) Client ¶
func (f *FakeCompatPlugin) Client() *plugins.Client
func (*FakeCompatPlugin) IsV1 ¶
func (f *FakeCompatPlugin) IsV1() bool
func (*FakeCompatPlugin) Name ¶
func (f *FakeCompatPlugin) Name() string
func (*FakeCompatPlugin) Protocol ¶
func (f *FakeCompatPlugin) Protocol() string
func (*FakeCompatPlugin) ScopedPath ¶
func (f *FakeCompatPlugin) ScopedPath(path string) string
func (*FakeCompatPlugin) Timeout ¶
func (f *FakeCompatPlugin) Timeout() time.Duration
type FakePluginGetter ¶
type FakePluginGetter struct {
Plugins map[string]*FakeCompatPlugin
}
func (*FakePluginGetter) Get ¶
func (f *FakePluginGetter) Get(name, capability string, _ int) (plugingetter.CompatPlugin, error)
func (*FakePluginGetter) GetAllByCap ¶
func (f *FakePluginGetter) GetAllByCap(_ string) ([]plugingetter.CompatPlugin, error)
GetAllByCap is not needed in the fake and is unimplemented
func (*FakePluginGetter) GetAllManagedPluginsByCap ¶
func (f *FakePluginGetter) GetAllManagedPluginsByCap(capability string) []plugingetter.CompatPlugin
GetAllManagedPluginsByCap returns all of the fake's plugins. If capability is anything other than DockerCSIPluginCap, it returns nothing.
Click to show internal directories.
Click to hide internal directories.