mock_agent

package
v0.0.0-...-31509f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAgentServer

type MockAgentServer struct {
	UpgradeConvertPrimarySegmentsRequest *idl.UpgradePrimariesRequest
	DeleteDataDirectoriesRequest         *idl.DeleteDataDirectoriesRequest

	Err chan error
	// contains filtered or unexported fields
}

func NewMockAgentServer

func NewMockAgentServer() (*MockAgentServer, func(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error), int)

NewMockAgentServer starts a locally running Agent server and returns a struct that facilitates unit testing. It also returns a hub.Dialer that will redirect any outgoing connections to this mock server, as well as the port that the server is listening on.

XXX Why is the Dialer type that we need for this agent defined in the hub package?

func (*MockAgentServer) AddReplicationEntries

func (*MockAgentServer) CreateRecoveryConf

func (*MockAgentServer) DeleteTablespaceDirectories

func (*MockAgentServer) NumberOfCalls

func (m *MockAgentServer) NumberOfCalls() int

func (*MockAgentServer) RenameDirectories

func (*MockAgentServer) RenameTablespaces

func (*MockAgentServer) RestorePrimariesPgControl

func (m *MockAgentServer) RestorePrimariesPgControl(ctx context.Context, in *idl.RestorePgControlRequest) (*idl.RestorePgControlReply, error)

func (*MockAgentServer) RsyncDataDirectories

func (m *MockAgentServer) RsyncDataDirectories(context.Context, *idl.RsyncRequest) (*idl.RsyncReply, error)

func (*MockAgentServer) RsyncTablespaceDirectories

func (m *MockAgentServer) RsyncTablespaceDirectories(context.Context, *idl.RsyncRequest) (*idl.RsyncReply, error)

func (*MockAgentServer) Stop

func (m *MockAgentServer) Stop()

func (*MockAgentServer) StopAgent

func (*MockAgentServer) UpgradePrimaries

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL