Documentation ¶
Index ¶
- type MockAsyncCommandNotificationStore
- func (a *MockAsyncCommandNotificationStore) CleanPodNotification(srcName types.NamespacedName, pod string)
- func (a *MockAsyncCommandNotificationStore) CleanPodsNotifications(srcName types.NamespacedName)
- func (a *MockAsyncCommandNotificationStore) GetCommandResult(srcName types.NamespacedName, pod string, command ctrlmessage.AsyncCommand) *ctrlmessage.AsyncCommandResult
- func (a *MockAsyncCommandNotificationStore) MessageHandler(srcName types.NamespacedName, pod string) ctrl.MessageHandler
- type MockConnectionPool
- func (c *MockConnectionPool) Close(ctx context.Context)
- func (c *MockConnectionPool) DialControlService(ctx context.Context, key string, host string) (string, ctrl.Service, error)
- func (c *MockConnectionPool) GetConnectedHosts(key string) []string
- func (c *MockConnectionPool) GetServices(key string) map[string]ctrl.Service
- func (c *MockConnectionPool) ReconcileConnections(ctx context.Context, key string, wantConnections []string, ...) (map[string]ctrl.Service, error)
- func (c *MockConnectionPool) RemoveAllConnections(ctx context.Context, key string)
- func (c *MockConnectionPool) RemoveConnection(ctx context.Context, key string, host string)
- func (c *MockConnectionPool) ResolveControlInterface(key string, host string) (string, ctrl.Service)
- type MockServerHandler
- func (s *MockServerHandler) AddAsyncHandler(opcode ctrl.OpCode, resultOpcode ctrl.OpCode, ...)
- func (s *MockServerHandler) AddSyncHandler(opcode ctrl.OpCode, handler ctrl.MessageHandlerFunc)
- func (s *MockServerHandler) RemoveHandler(opcode ctrl.OpCode)
- func (s *MockServerHandler) Shutdown(timeout time.Duration)
- type MockService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAsyncCommandNotificationStore ¶
func (*MockAsyncCommandNotificationStore) CleanPodNotification ¶
func (a *MockAsyncCommandNotificationStore) CleanPodNotification(srcName types.NamespacedName, pod string)
func (*MockAsyncCommandNotificationStore) CleanPodsNotifications ¶
func (a *MockAsyncCommandNotificationStore) CleanPodsNotifications(srcName types.NamespacedName)
func (*MockAsyncCommandNotificationStore) GetCommandResult ¶
func (a *MockAsyncCommandNotificationStore) GetCommandResult(srcName types.NamespacedName, pod string, command ctrlmessage.AsyncCommand) *ctrlmessage.AsyncCommandResult
func (*MockAsyncCommandNotificationStore) MessageHandler ¶
func (a *MockAsyncCommandNotificationStore) MessageHandler(srcName types.NamespacedName, pod string) ctrl.MessageHandler
type MockConnectionPool ¶
func (*MockConnectionPool) Close ¶
func (c *MockConnectionPool) Close(ctx context.Context)
func (*MockConnectionPool) DialControlService ¶
func (*MockConnectionPool) GetConnectedHosts ¶
func (c *MockConnectionPool) GetConnectedHosts(key string) []string
func (*MockConnectionPool) GetServices ¶
func (c *MockConnectionPool) GetServices(key string) map[string]ctrl.Service
func (*MockConnectionPool) ReconcileConnections ¶
func (*MockConnectionPool) RemoveAllConnections ¶
func (c *MockConnectionPool) RemoveAllConnections(ctx context.Context, key string)
func (*MockConnectionPool) RemoveConnection ¶
func (c *MockConnectionPool) RemoveConnection(ctx context.Context, key string, host string)
func (*MockConnectionPool) ResolveControlInterface ¶
type MockServerHandler ¶
type MockServerHandler struct { mock.Mock // Export the Router field so that tests can verify handlers in it directly Router ctrlservice.MessageRouter Service *MockService }
MockServerHandler is a mock of the ServerHandler that only stores results from AddAsyncHandler
func GetMockServerHandler ¶
func GetMockServerHandler() *MockServerHandler
func (*MockServerHandler) AddAsyncHandler ¶
func (s *MockServerHandler) AddAsyncHandler(opcode ctrl.OpCode, resultOpcode ctrl.OpCode, payloadType ctrlmessage.AsyncCommand, handler func(ctx context.Context, commandMessage ctrlservice.AsyncCommandMessage))
func (*MockServerHandler) AddSyncHandler ¶
func (s *MockServerHandler) AddSyncHandler(opcode ctrl.OpCode, handler ctrl.MessageHandlerFunc)
func (*MockServerHandler) RemoveHandler ¶
func (s *MockServerHandler) RemoveHandler(opcode ctrl.OpCode)
func (*MockServerHandler) Shutdown ¶
func (s *MockServerHandler) Shutdown(timeout time.Duration)
type MockService ¶
func (*MockService) ErrorHandler ¶
func (s *MockService) ErrorHandler(handler ctrl.ErrorHandler)
func (*MockService) MessageHandler ¶
func (s *MockService) MessageHandler(handler ctrl.MessageHandler)
func (*MockService) SendAndWaitForAck ¶
func (s *MockService) SendAndWaitForAck(opcode ctrl.OpCode, payload encoding.BinaryMarshaler) error
Click to show internal directories.
Click to hide internal directories.