engines

package
v0.8.0-beta.27 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: AGPL-3.0 Imports: 15 Imported by: 1

Documentation

Overview

Package engines is a generated GoMock package.

Index

Constants

View Source
const (
	HOST     = "host"
	PORT     = "port"
	USER     = "user"
	PASSWORD = "password"
	COMMAND  = "command"
)
View Source
const (
	// types for probe
	CheckRunningType int = iota
	CheckStatusType
	CheckRoleChangedType
)

Variables

View Source
var (
	EnvVarMap = map[string]string{
		HOST:     "KB_HOST",
		PORT:     "KB_PORT",
		USER:     "KB_USER",
		PASSWORD: "KB_PASSWD",
	}

	NewCommandFuncs = map[string]NewCommandFunc{}
)

Functions

func AddSingleQuote

func AddSingleQuote(str string) string

func BuildExample

func BuildExample(info *ConnectionInfo, client string, examples map[models.ClientType]BuildConnectExample) string

func GetIndex

func GetIndex(memberName string) (int, error)

func MaxInt64

func MaxInt64(x, y int64) int64

Types

type AuthInfo

type AuthInfo struct {
	UserName   string
	UserPasswd string
}

AuthInfo is the authentication information for the database

type BuildConnectExample

type BuildConnectExample func(info *ConnectionInfo) string

type ClusterCommands

type ClusterCommands interface {
	ConnectCommand(info *AuthInfo) []string
	Container() string
	ConnectExample(info *ConnectionInfo, client string) string
	ExecuteCommand([]string) ([]string, []corev1.EnvVar, error)
}

type ConnectionInfo

type ConnectionInfo struct {
	Host             string
	User             string
	Password         string
	Database         string
	Port             string
	ClusterName      string
	ComponentName    string
	HeadlessEndpoint string
}

type DBManager

type DBManager interface {
	IsRunning() bool

	IsDBStartupReady() bool

	// Functions related to cluster initialization.
	InitializeCluster(context.Context, *dcs.Cluster) error
	IsClusterInitialized(context.Context, *dcs.Cluster) (bool, error)
	// IsCurrentMemberInCluster checks if current member is configured in cluster for consensus.
	// it will always return true for replicationset.
	IsCurrentMemberInCluster(context.Context, *dcs.Cluster) bool

	// IsClusterHealthy is only for consensus cluster healthy check.
	// For Replication cluster IsClusterHealthy will always return true,
	// and its cluster's healthy is equal to leader member's healthy.
	IsClusterHealthy(context.Context, *dcs.Cluster) bool

	// Member healthy check
	// IsMemberHealthy focuses on the database's read and write capabilities.
	IsMemberHealthy(context.Context, *dcs.Cluster, *dcs.Member) bool
	IsCurrentMemberHealthy(context.Context, *dcs.Cluster) bool
	// IsMemberLagging focuses on the latency between the leader and standby
	IsMemberLagging(context.Context, *dcs.Cluster, *dcs.Member) (bool, int64)
	GetLag(context.Context, *dcs.Cluster) (int64, error)

	// GetDBState will get most required database kernel states of current member in one HA loop to Avoiding duplicate queries and conserve I/O.
	// We believe that the states of database kernel remains unchanged within a single HA loop.
	GetDBState(context.Context, *dcs.Cluster) *dcs.DBState

	// HasOtherHealthyLeader is applicable only to consensus cluster,
	// where the db's internal role services as the source of truth.
	// for replicationset cluster,  HasOtherHealthyLeader will always be nil.
	HasOtherHealthyLeader(context.Context, *dcs.Cluster) *dcs.Member
	HasOtherHealthyMembers(context.Context, *dcs.Cluster, string) []*dcs.Member

	// Functions related to replica member relationship.
	IsLeader(context.Context, *dcs.Cluster) (bool, error)
	IsLeaderMember(context.Context, *dcs.Cluster, *dcs.Member) (bool, error)
	IsFirstMember() bool
	GetReplicaRole(context.Context, *dcs.Cluster) (string, error)

	JoinCurrentMemberToCluster(context.Context, *dcs.Cluster) error
	LeaveMemberFromCluster(context.Context, *dcs.Cluster, string) error

	// IsPromoted is applicable only to consensus cluster, which is used to
	// check if DB has complete switchover.
	// for replicationset cluster,  it will always be true.
	IsPromoted(context.Context) bool
	// Functions related to HA
	// The functions should be idempotent, indicating that if they have been executed in one ha cycle,
	// any subsequent calls during that cycle will have no effect.
	Promote(context.Context, *dcs.Cluster) error
	Demote(context.Context) error
	Follow(context.Context, *dcs.Cluster) error
	Recover(context.Context) error

	// Start and Stop just send signal to lorryctl
	Start(context.Context, *dcs.Cluster) error
	Stop() error

	GetCurrentMemberName() string
	GetMemberAddrs(context.Context, *dcs.Cluster) []string

	// Functions related to account manage
	IsRootCreated(context.Context) (bool, error)
	CreateRoot(context.Context) error

	// Readonly lock for disk full
	Lock(context.Context, string) error
	Unlock(context.Context) error

	// sql query
	Exec(context.Context, string) (int64, error)
	Query(context.Context, string) ([]byte, error)

	// user management
	ListUsers(context.Context) ([]models.UserInfo, error)
	ListSystemAccounts(context.Context) ([]models.UserInfo, error)
	CreateUser(context.Context, string, string) error
	DeleteUser(context.Context, string) error
	DescribeUser(context.Context, string) (*models.UserInfo, error)
	GrantUserRole(context.Context, string, string) error
	RevokeUserRole(context.Context, string, string) error

	GetPort() (int, error)

	MoveData(context.Context, *dcs.Cluster) error

	GetLogger() logr.Logger

	ShutDownWithWait()
}

func NewMockManager

func NewMockManager(properties Properties) (DBManager, error)

type DBManagerBase

type DBManagerBase struct {
	CurrentMemberName string
	ClusterCompName   string
	Namespace         string
	DataDir           string
	Logger            logr.Logger
	DBStartupReady    bool
	IsLocked          bool
	DBState           *dcs.DBState
}

func NewDBManagerBase

func NewDBManagerBase(logger logr.Logger) (*DBManagerBase, error)

func (*DBManagerBase) CreateRoot

func (mgr *DBManagerBase) CreateRoot(context.Context) error

func (*DBManagerBase) CreateUser

func (mgr *DBManagerBase) CreateUser(context.Context, string, string) error

func (*DBManagerBase) DeleteUser

func (mgr *DBManagerBase) DeleteUser(context.Context, string) error

func (*DBManagerBase) Demote

func (mgr *DBManagerBase) Demote(context.Context) error

func (*DBManagerBase) DescribeUser

func (mgr *DBManagerBase) DescribeUser(context.Context, string) (*models.UserInfo, error)

func (*DBManagerBase) Exec

func (mgr *DBManagerBase) Exec(context.Context, string) (int64, error)

func (*DBManagerBase) Follow

func (mgr *DBManagerBase) Follow(context.Context, *dcs.Cluster) error

func (*DBManagerBase) GetCurrentMemberName

func (mgr *DBManagerBase) GetCurrentMemberName() string

func (*DBManagerBase) GetDBState

func (mgr *DBManagerBase) GetDBState(context.Context, *dcs.Cluster) *dcs.DBState

func (*DBManagerBase) GetLag

func (mgr *DBManagerBase) GetLag(context.Context, *dcs.Cluster) (int64, error)

func (*DBManagerBase) GetLogger

func (mgr *DBManagerBase) GetLogger() logr.Logger

func (*DBManagerBase) GetMemberAddrs

func (mgr *DBManagerBase) GetMemberAddrs(context.Context, *dcs.Cluster) []string

func (*DBManagerBase) GetPort

func (mgr *DBManagerBase) GetPort() (int, error)

func (*DBManagerBase) GetReplicaRole

func (mgr *DBManagerBase) GetReplicaRole(context.Context, *dcs.Cluster) (string, error)

func (*DBManagerBase) GrantUserRole

func (mgr *DBManagerBase) GrantUserRole(context.Context, string, string) error

func (*DBManagerBase) HasOtherHealthyLeader

func (mgr *DBManagerBase) HasOtherHealthyLeader(context.Context, *dcs.Cluster) *dcs.Member

func (*DBManagerBase) HasOtherHealthyMembers

func (mgr *DBManagerBase) HasOtherHealthyMembers(context.Context, *dcs.Cluster, string) []*dcs.Member

func (*DBManagerBase) InitializeCluster

func (mgr *DBManagerBase) InitializeCluster(context.Context, *dcs.Cluster) error

func (*DBManagerBase) IsClusterHealthy

func (mgr *DBManagerBase) IsClusterHealthy(context.Context, *dcs.Cluster) bool

func (*DBManagerBase) IsClusterInitialized

func (mgr *DBManagerBase) IsClusterInitialized(context.Context, *dcs.Cluster) (bool, error)

func (*DBManagerBase) IsCurrentMemberHealthy

func (mgr *DBManagerBase) IsCurrentMemberHealthy(context.Context, *dcs.Cluster) bool

func (*DBManagerBase) IsCurrentMemberInCluster

func (mgr *DBManagerBase) IsCurrentMemberInCluster(context.Context, *dcs.Cluster) bool

func (*DBManagerBase) IsDBStartupReady

func (mgr *DBManagerBase) IsDBStartupReady() bool

func (*DBManagerBase) IsFirstMember

func (mgr *DBManagerBase) IsFirstMember() bool

func (*DBManagerBase) IsLeader

func (mgr *DBManagerBase) IsLeader(context.Context, *dcs.Cluster) (bool, error)

func (*DBManagerBase) IsLeaderMember

func (mgr *DBManagerBase) IsLeaderMember(context.Context, *dcs.Cluster, *dcs.Member) (bool, error)

func (*DBManagerBase) IsMemberHealthy

func (mgr *DBManagerBase) IsMemberHealthy(context.Context, *dcs.Cluster, *dcs.Member) bool

func (*DBManagerBase) IsMemberLagging

func (mgr *DBManagerBase) IsMemberLagging(context.Context, *dcs.Cluster, *dcs.Member) (bool, int64)

func (*DBManagerBase) IsPromoted

func (mgr *DBManagerBase) IsPromoted(context.Context) bool

func (*DBManagerBase) IsRootCreated

func (mgr *DBManagerBase) IsRootCreated(context.Context) (bool, error)

func (*DBManagerBase) IsRunning

func (mgr *DBManagerBase) IsRunning() bool

func (*DBManagerBase) JoinCurrentMemberToCluster

func (mgr *DBManagerBase) JoinCurrentMemberToCluster(context.Context, *dcs.Cluster) error

func (*DBManagerBase) LeaveMemberFromCluster

func (mgr *DBManagerBase) LeaveMemberFromCluster(context.Context, *dcs.Cluster, string) error

func (*DBManagerBase) ListSystemAccounts

func (mgr *DBManagerBase) ListSystemAccounts(context.Context) ([]models.UserInfo, error)

func (*DBManagerBase) ListUsers

func (mgr *DBManagerBase) ListUsers(context.Context) ([]models.UserInfo, error)

func (*DBManagerBase) Lock

func (*DBManagerBase) MoveData

func (mgr *DBManagerBase) MoveData(context.Context, *dcs.Cluster) error

func (*DBManagerBase) Promote

func (mgr *DBManagerBase) Promote(context.Context, *dcs.Cluster) error

func (*DBManagerBase) Query

func (mgr *DBManagerBase) Query(context.Context, string) ([]byte, error)

func (*DBManagerBase) Recover

func (mgr *DBManagerBase) Recover(context.Context) error

func (*DBManagerBase) RevokeUserRole

func (mgr *DBManagerBase) RevokeUserRole(context.Context, string, string) error

func (*DBManagerBase) SetLogger

func (mgr *DBManagerBase) SetLogger(logger logr.Logger)

func (*DBManagerBase) ShutDownWithWait

func (mgr *DBManagerBase) ShutDownWithWait()

func (*DBManagerBase) Start

func (mgr *DBManagerBase) Start(context.Context, *dcs.Cluster) error

func (*DBManagerBase) Stop

func (mgr *DBManagerBase) Stop() error

func (*DBManagerBase) Unlock

func (mgr *DBManagerBase) Unlock(context.Context) error

type EngineInfo

type EngineInfo struct {
	Client      string
	Container   string
	PasswordEnv string
	UserEnv     string
	Database    string
}

type MockDBManager

type MockDBManager struct {
	// contains filtered or unexported fields
}

MockDBManager is a mock of DBManager interface.

func NewMockDBManager

func NewMockDBManager(ctrl *gomock.Controller) *MockDBManager

NewMockDBManager creates a new mock instance.

func (*MockDBManager) CreateRoot

func (m *MockDBManager) CreateRoot(arg0 context.Context) error

CreateRoot mocks base method.

func (*MockDBManager) CreateUser

func (m *MockDBManager) CreateUser(arg0 context.Context, arg1, arg2 string) error

CreateUser mocks base method.

func (*MockDBManager) DeleteUser

func (m *MockDBManager) DeleteUser(arg0 context.Context, arg1 string) error

DeleteUser mocks base method.

func (*MockDBManager) Demote

func (m *MockDBManager) Demote(arg0 context.Context) error

Demote mocks base method.

func (*MockDBManager) DescribeUser

func (m *MockDBManager) DescribeUser(arg0 context.Context, arg1 string) (*models.UserInfo, error)

DescribeUser mocks base method.

func (*MockDBManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDBManager) Exec

func (m *MockDBManager) Exec(arg0 context.Context, arg1 string) (int64, error)

Exec mocks base method.

func (*MockDBManager) Follow

func (m *MockDBManager) Follow(arg0 context.Context, arg1 *dcs.Cluster) error

Follow mocks base method.

func (*MockDBManager) GetCurrentMemberName

func (m *MockDBManager) GetCurrentMemberName() string

GetCurrentMemberName mocks base method.

func (*MockDBManager) GetDBState

func (m *MockDBManager) GetDBState(arg0 context.Context, arg1 *dcs.Cluster) *dcs.DBState

GetDBState mocks base method.

func (*MockDBManager) GetHealthiestMember

func (m *MockDBManager) GetHealthiestMember(arg0 *dcs.Cluster, arg1 string) *dcs.Member

GetHealthiestMember mocks base method.

func (*MockDBManager) GetLag

func (m *MockDBManager) GetLag(arg0 context.Context, arg1 *dcs.Cluster) (int64, error)

GetLag mocks base method.

func (*MockDBManager) GetLogger

func (m *MockDBManager) GetLogger() logr.Logger

GetLogger mocks base method.

func (*MockDBManager) GetMemberAddrs

func (m *MockDBManager) GetMemberAddrs(arg0 context.Context, arg1 *dcs.Cluster) []string

GetMemberAddrs mocks base method.

func (*MockDBManager) GetPort

func (m *MockDBManager) GetPort() (int, error)

GetPort mocks base method.

func (*MockDBManager) GetReplicaRole

func (m *MockDBManager) GetReplicaRole(arg0 context.Context, arg1 *dcs.Cluster) (string, error)

GetReplicaRole mocks base method.

func (*MockDBManager) GrantUserRole

func (m *MockDBManager) GrantUserRole(arg0 context.Context, arg1, arg2 string) error

GrantUserRole mocks base method.

func (*MockDBManager) HasOtherHealthyLeader

func (m *MockDBManager) HasOtherHealthyLeader(arg0 context.Context, arg1 *dcs.Cluster) *dcs.Member

HasOtherHealthyLeader mocks base method.

func (*MockDBManager) HasOtherHealthyMembers

func (m *MockDBManager) HasOtherHealthyMembers(arg0 context.Context, arg1 *dcs.Cluster, arg2 string) []*dcs.Member

HasOtherHealthyMembers mocks base method.

func (*MockDBManager) InitializeCluster

func (m *MockDBManager) InitializeCluster(arg0 context.Context, arg1 *dcs.Cluster) error

InitializeCluster mocks base method.

func (*MockDBManager) IsClusterHealthy

func (m *MockDBManager) IsClusterHealthy(arg0 context.Context, arg1 *dcs.Cluster) bool

IsClusterHealthy mocks base method.

func (*MockDBManager) IsClusterInitialized

func (m *MockDBManager) IsClusterInitialized(arg0 context.Context, arg1 *dcs.Cluster) (bool, error)

IsClusterInitialized mocks base method.

func (*MockDBManager) IsCurrentMemberHealthy

func (m *MockDBManager) IsCurrentMemberHealthy(arg0 context.Context, arg1 *dcs.Cluster) bool

IsCurrentMemberHealthy mocks base method.

func (*MockDBManager) IsCurrentMemberInCluster

func (m *MockDBManager) IsCurrentMemberInCluster(arg0 context.Context, arg1 *dcs.Cluster) bool

IsCurrentMemberInCluster mocks base method.

func (*MockDBManager) IsDBStartupReady

func (m *MockDBManager) IsDBStartupReady() bool

IsDBStartupReady mocks base method.

func (*MockDBManager) IsFirstMember

func (m *MockDBManager) IsFirstMember() bool

IsFirstMember mocks base method.

func (*MockDBManager) IsLeader

func (m *MockDBManager) IsLeader(arg0 context.Context, arg1 *dcs.Cluster) (bool, error)

IsLeader mocks base method.

func (*MockDBManager) IsLeaderMember

func (m *MockDBManager) IsLeaderMember(arg0 context.Context, arg1 *dcs.Cluster, arg2 *dcs.Member) (bool, error)

IsLeaderMember mocks base method.

func (*MockDBManager) IsMemberHealthy

func (m *MockDBManager) IsMemberHealthy(arg0 context.Context, arg1 *dcs.Cluster, arg2 *dcs.Member) bool

IsMemberHealthy mocks base method.

func (*MockDBManager) IsMemberLagging

func (m *MockDBManager) IsMemberLagging(arg0 context.Context, arg1 *dcs.Cluster, arg2 *dcs.Member) (bool, int64)

IsMemberLagging mocks base method.

func (*MockDBManager) IsPromoted

func (m *MockDBManager) IsPromoted(arg0 context.Context) bool

IsPromoted mocks base method.

func (*MockDBManager) IsRootCreated

func (m *MockDBManager) IsRootCreated(arg0 context.Context) (bool, error)

IsRootCreated mocks base method.

func (*MockDBManager) IsRunning

func (m *MockDBManager) IsRunning() bool

IsRunning mocks base method.

func (*MockDBManager) JoinCurrentMemberToCluster

func (m *MockDBManager) JoinCurrentMemberToCluster(arg0 context.Context, arg1 *dcs.Cluster) error

JoinCurrentMemberToCluster mocks base method.

func (*MockDBManager) LeaveMemberFromCluster

func (m *MockDBManager) LeaveMemberFromCluster(arg0 context.Context, arg1 *dcs.Cluster, arg2 string) error

LeaveMemberFromCluster mocks base method.

func (*MockDBManager) ListSystemAccounts

func (m *MockDBManager) ListSystemAccounts(arg0 context.Context) ([]models.UserInfo, error)

ListSystemAccounts mocks base method.

func (*MockDBManager) ListUsers

func (m *MockDBManager) ListUsers(arg0 context.Context) ([]models.UserInfo, error)

ListUsers mocks base method.

func (*MockDBManager) Lock

func (m *MockDBManager) Lock(arg0 context.Context, arg1 string) error

Lock mocks base method.

func (*MockDBManager) MoveData

func (m *MockDBManager) MoveData(arg0 context.Context, arg1 *dcs.Cluster) error

MoveData mocks base method.

func (*MockDBManager) Promote

func (m *MockDBManager) Promote(arg0 context.Context, arg1 *dcs.Cluster) error

Promote mocks base method.

func (*MockDBManager) Query

func (m *MockDBManager) Query(arg0 context.Context, arg1 string) ([]byte, error)

Query mocks base method.

func (*MockDBManager) Recover

func (m *MockDBManager) Recover(arg0 context.Context) error

Recover mocks base method.

func (*MockDBManager) RevokeUserRole

func (m *MockDBManager) RevokeUserRole(arg0 context.Context, arg1, arg2 string) error

RevokeUserRole mocks base method.

func (*MockDBManager) ShutDownWithWait

func (m *MockDBManager) ShutDownWithWait()

ShutDownWithWait mocks base method.

func (*MockDBManager) Start

func (m *MockDBManager) Start(arg0 context.Context, arg1 *dcs.Cluster) error

Start mocks base method.

func (*MockDBManager) Stop

func (m *MockDBManager) Stop() error

Stop mocks base method.

func (*MockDBManager) Unlock

func (m *MockDBManager) Unlock(arg0 context.Context) error

Unlock mocks base method.

type MockDBManagerMockRecorder

type MockDBManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockDBManagerMockRecorder is the mock recorder for MockDBManager.

func (*MockDBManagerMockRecorder) CreateRoot

func (mr *MockDBManagerMockRecorder) CreateRoot(arg0 interface{}) *gomock.Call

CreateRoot indicates an expected call of CreateRoot.

func (*MockDBManagerMockRecorder) CreateUser

func (mr *MockDBManagerMockRecorder) CreateUser(arg0, arg1, arg2 interface{}) *gomock.Call

CreateUser indicates an expected call of CreateUser.

func (*MockDBManagerMockRecorder) DeleteUser

func (mr *MockDBManagerMockRecorder) DeleteUser(arg0, arg1 interface{}) *gomock.Call

DeleteUser indicates an expected call of DeleteUser.

func (*MockDBManagerMockRecorder) Demote

func (mr *MockDBManagerMockRecorder) Demote(arg0 interface{}) *gomock.Call

Demote indicates an expected call of Demote.

func (*MockDBManagerMockRecorder) DescribeUser

func (mr *MockDBManagerMockRecorder) DescribeUser(arg0, arg1 interface{}) *gomock.Call

DescribeUser indicates an expected call of DescribeUser.

func (*MockDBManagerMockRecorder) Exec

func (mr *MockDBManagerMockRecorder) Exec(arg0, arg1 interface{}) *gomock.Call

Exec indicates an expected call of Exec.

func (*MockDBManagerMockRecorder) Follow

func (mr *MockDBManagerMockRecorder) Follow(arg0, arg1 interface{}) *gomock.Call

Follow indicates an expected call of Follow.

func (*MockDBManagerMockRecorder) GetCurrentMemberName

func (mr *MockDBManagerMockRecorder) GetCurrentMemberName() *gomock.Call

GetCurrentMemberName indicates an expected call of GetCurrentMemberName.

func (*MockDBManagerMockRecorder) GetDBState

func (mr *MockDBManagerMockRecorder) GetDBState(arg0, arg1 interface{}) *gomock.Call

GetDBState indicates an expected call of GetDBState.

func (*MockDBManagerMockRecorder) GetHealthiestMember

func (mr *MockDBManagerMockRecorder) GetHealthiestMember(arg0, arg1 interface{}) *gomock.Call

GetHealthiestMember indicates an expected call of GetHealthiestMember.

func (*MockDBManagerMockRecorder) GetLag

func (mr *MockDBManagerMockRecorder) GetLag(arg0, arg1 interface{}) *gomock.Call

GetLag indicates an expected call of GetLag.

func (*MockDBManagerMockRecorder) GetLogger

func (mr *MockDBManagerMockRecorder) GetLogger() *gomock.Call

GetLogger indicates an expected call of GetLogger.

func (*MockDBManagerMockRecorder) GetMemberAddrs

func (mr *MockDBManagerMockRecorder) GetMemberAddrs(arg0, arg1 interface{}) *gomock.Call

GetMemberAddrs indicates an expected call of GetMemberAddrs.

func (*MockDBManagerMockRecorder) GetPort

func (mr *MockDBManagerMockRecorder) GetPort() *gomock.Call

GetPort indicates an expected call of GetPort.

func (*MockDBManagerMockRecorder) GetReplicaRole

func (mr *MockDBManagerMockRecorder) GetReplicaRole(arg0, arg1 interface{}) *gomock.Call

GetReplicaRole indicates an expected call of GetReplicaRole.

func (*MockDBManagerMockRecorder) GrantUserRole

func (mr *MockDBManagerMockRecorder) GrantUserRole(arg0, arg1, arg2 interface{}) *gomock.Call

GrantUserRole indicates an expected call of GrantUserRole.

func (*MockDBManagerMockRecorder) HasOtherHealthyLeader

func (mr *MockDBManagerMockRecorder) HasOtherHealthyLeader(arg0, arg1 interface{}) *gomock.Call

HasOtherHealthyLeader indicates an expected call of HasOtherHealthyLeader.

func (*MockDBManagerMockRecorder) HasOtherHealthyMembers

func (mr *MockDBManagerMockRecorder) HasOtherHealthyMembers(arg0, arg1, arg2 interface{}) *gomock.Call

HasOtherHealthyMembers indicates an expected call of HasOtherHealthyMembers.

func (*MockDBManagerMockRecorder) InitializeCluster

func (mr *MockDBManagerMockRecorder) InitializeCluster(arg0, arg1 interface{}) *gomock.Call

InitializeCluster indicates an expected call of InitializeCluster.

func (*MockDBManagerMockRecorder) IsClusterHealthy

func (mr *MockDBManagerMockRecorder) IsClusterHealthy(arg0, arg1 interface{}) *gomock.Call

IsClusterHealthy indicates an expected call of IsClusterHealthy.

func (*MockDBManagerMockRecorder) IsClusterInitialized

func (mr *MockDBManagerMockRecorder) IsClusterInitialized(arg0, arg1 interface{}) *gomock.Call

IsClusterInitialized indicates an expected call of IsClusterInitialized.

func (*MockDBManagerMockRecorder) IsCurrentMemberHealthy

func (mr *MockDBManagerMockRecorder) IsCurrentMemberHealthy(arg0, arg1 interface{}) *gomock.Call

IsCurrentMemberHealthy indicates an expected call of IsCurrentMemberHealthy.

func (*MockDBManagerMockRecorder) IsCurrentMemberInCluster

func (mr *MockDBManagerMockRecorder) IsCurrentMemberInCluster(arg0, arg1 interface{}) *gomock.Call

IsCurrentMemberInCluster indicates an expected call of IsCurrentMemberInCluster.

func (*MockDBManagerMockRecorder) IsDBStartupReady

func (mr *MockDBManagerMockRecorder) IsDBStartupReady() *gomock.Call

IsDBStartupReady indicates an expected call of IsDBStartupReady.

func (*MockDBManagerMockRecorder) IsFirstMember

func (mr *MockDBManagerMockRecorder) IsFirstMember() *gomock.Call

IsFirstMember indicates an expected call of IsFirstMember.

func (*MockDBManagerMockRecorder) IsLeader

func (mr *MockDBManagerMockRecorder) IsLeader(arg0, arg1 interface{}) *gomock.Call

IsLeader indicates an expected call of IsLeader.

func (*MockDBManagerMockRecorder) IsLeaderMember

func (mr *MockDBManagerMockRecorder) IsLeaderMember(arg0, arg1, arg2 interface{}) *gomock.Call

IsLeaderMember indicates an expected call of IsLeaderMember.

func (*MockDBManagerMockRecorder) IsMemberHealthy

func (mr *MockDBManagerMockRecorder) IsMemberHealthy(arg0, arg1, arg2 interface{}) *gomock.Call

IsMemberHealthy indicates an expected call of IsMemberHealthy.

func (*MockDBManagerMockRecorder) IsMemberLagging

func (mr *MockDBManagerMockRecorder) IsMemberLagging(arg0, arg1, arg2 interface{}) *gomock.Call

IsMemberLagging indicates an expected call of IsMemberLagging.

func (*MockDBManagerMockRecorder) IsPromoted

func (mr *MockDBManagerMockRecorder) IsPromoted(arg0 interface{}) *gomock.Call

IsPromoted indicates an expected call of IsPromoted.

func (*MockDBManagerMockRecorder) IsRootCreated

func (mr *MockDBManagerMockRecorder) IsRootCreated(arg0 interface{}) *gomock.Call

IsRootCreated indicates an expected call of IsRootCreated.

func (*MockDBManagerMockRecorder) IsRunning

func (mr *MockDBManagerMockRecorder) IsRunning() *gomock.Call

IsRunning indicates an expected call of IsRunning.

func (*MockDBManagerMockRecorder) JoinCurrentMemberToCluster

func (mr *MockDBManagerMockRecorder) JoinCurrentMemberToCluster(arg0, arg1 interface{}) *gomock.Call

JoinCurrentMemberToCluster indicates an expected call of JoinCurrentMemberToCluster.

func (*MockDBManagerMockRecorder) LeaveMemberFromCluster

func (mr *MockDBManagerMockRecorder) LeaveMemberFromCluster(arg0, arg1, arg2 interface{}) *gomock.Call

LeaveMemberFromCluster indicates an expected call of LeaveMemberFromCluster.

func (*MockDBManagerMockRecorder) ListSystemAccounts

func (mr *MockDBManagerMockRecorder) ListSystemAccounts(arg0 interface{}) *gomock.Call

ListSystemAccounts indicates an expected call of ListSystemAccounts.

func (*MockDBManagerMockRecorder) ListUsers

func (mr *MockDBManagerMockRecorder) ListUsers(arg0 interface{}) *gomock.Call

ListUsers indicates an expected call of ListUsers.

func (*MockDBManagerMockRecorder) Lock

func (mr *MockDBManagerMockRecorder) Lock(arg0, arg1 interface{}) *gomock.Call

Lock indicates an expected call of Lock.

func (*MockDBManagerMockRecorder) MoveData

func (mr *MockDBManagerMockRecorder) MoveData(arg0, arg1 interface{}) *gomock.Call

MoveData indicates an expected call of MoveData.

func (*MockDBManagerMockRecorder) Promote

func (mr *MockDBManagerMockRecorder) Promote(arg0, arg1 interface{}) *gomock.Call

Promote indicates an expected call of Promote.

func (*MockDBManagerMockRecorder) Query

func (mr *MockDBManagerMockRecorder) Query(arg0, arg1 interface{}) *gomock.Call

Query indicates an expected call of Query.

func (*MockDBManagerMockRecorder) Recover

func (mr *MockDBManagerMockRecorder) Recover(arg0 interface{}) *gomock.Call

Recover indicates an expected call of Recover.

func (*MockDBManagerMockRecorder) RevokeUserRole

func (mr *MockDBManagerMockRecorder) RevokeUserRole(arg0, arg1, arg2 interface{}) *gomock.Call

RevokeUserRole indicates an expected call of RevokeUserRole.

func (*MockDBManagerMockRecorder) ShutDownWithWait

func (mr *MockDBManagerMockRecorder) ShutDownWithWait() *gomock.Call

ShutDownWithWait indicates an expected call of ShutDownWithWait.

func (*MockDBManagerMockRecorder) Start

func (mr *MockDBManagerMockRecorder) Start(arg0, arg1 interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockDBManagerMockRecorder) Stop

Stop indicates an expected call of Stop.

func (*MockDBManagerMockRecorder) Unlock

func (mr *MockDBManagerMockRecorder) Unlock(arg0 interface{}) *gomock.Call

Unlock indicates an expected call of Unlock.

type MockManager

type MockManager struct {
	DBManagerBase
}

func (*MockManager) CreateRoot

func (*MockManager) CreateRoot(context.Context) error

func (*MockManager) Demote

func (*MockManager) Demote(context.Context) error

func (*MockManager) Follow

func (*MockManager) GetHealthiestMember

func (*MockManager) GetHealthiestMember(*dcs.Cluster, string) *dcs.Member

func (*MockManager) GetMemberAddrs

func (*MockManager) GetMemberAddrs(context.Context, *dcs.Cluster) []string

func (*MockManager) HasOtherHealthyLeader

func (*MockManager) HasOtherHealthyLeader(context.Context, *dcs.Cluster) *dcs.Member

func (*MockManager) HasOtherHealthyMembers

func (*MockManager) HasOtherHealthyMembers(context.Context, *dcs.Cluster, string) []*dcs.Member

func (*MockManager) InitializeCluster

func (*MockManager) InitializeCluster(context.Context, *dcs.Cluster) error

func (*MockManager) IsClusterHealthy

func (*MockManager) IsClusterHealthy(context.Context, *dcs.Cluster) bool

func (*MockManager) IsClusterInitialized

func (*MockManager) IsClusterInitialized(context.Context, *dcs.Cluster) (bool, error)

func (*MockManager) IsCurrentMemberHealthy

func (*MockManager) IsCurrentMemberHealthy(context.Context, *dcs.Cluster) bool

func (*MockManager) IsCurrentMemberInCluster

func (*MockManager) IsCurrentMemberInCluster(context.Context, *dcs.Cluster) bool

func (*MockManager) IsDBStartupReady

func (*MockManager) IsDBStartupReady() bool

func (*MockManager) IsFirstMember

func (*MockManager) IsFirstMember() bool

func (*MockManager) IsLeader

func (*MockManager) IsLeader(context.Context, *dcs.Cluster) (bool, error)

func (*MockManager) IsLeaderMember

func (*MockManager) IsLeaderMember(context.Context, *dcs.Cluster, *dcs.Member) (bool, error)

func (*MockManager) IsMemberHealthy

func (*MockManager) IsMemberHealthy(context.Context, *dcs.Cluster, *dcs.Member) bool

func (*MockManager) IsPromoted

func (*MockManager) IsPromoted(context.Context) bool

func (*MockManager) IsRootCreated

func (*MockManager) IsRootCreated(context.Context) (bool, error)

func (*MockManager) IsRunning

func (*MockManager) IsRunning() bool

func (*MockManager) JoinCurrentMemberToCluster

func (*MockManager) JoinCurrentMemberToCluster(context.Context, *dcs.Cluster) error

func (*MockManager) LeaveMemberFromCluster

func (*MockManager) LeaveMemberFromCluster(context.Context, *dcs.Cluster, string) error

func (*MockManager) Lock

func (*MockManager) Promote

func (*MockManager) Recover

func (*MockManager) Recover(context.Context) error

func (*MockManager) Unlock

func (*MockManager) Unlock(context.Context) error

type NewCommandFunc

type NewCommandFunc func() ClusterCommands

type Properties

type Properties map[string]string

Jump to

Keyboard shortcuts

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