replica

package
v0.9.3-beta.10 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessMode

type AccessMode string

AccessMode defines SVC access mode enums. +enum

type CheckRole

type CheckRole struct {
	operations.Base

	OriRole                    string
	CheckRoleFailedCount       int
	FailedEventReportFrequency int
	Timeout                    time.Duration
	DBRoles                    map[string]AccessMode
	Command                    []string
	// contains filtered or unexported fields
}

func (*CheckRole) Do

func (*CheckRole) Init

func (s *CheckRole) Init(ctx context.Context) error

func (*CheckRole) IsReadonly

func (s *CheckRole) IsReadonly(ctx context.Context) bool

type CheckRunning

type CheckRunning struct {
	operations.Base

	Timeout                    time.Duration
	DBAddress                  string
	CheckRunningFailedCount    int
	FailedEventReportFrequency int
	// contains filtered or unexported fields
}

CheckRunning checks whether the binding service is in running status, If check fails continuously, report an event at FailedEventReportFrequency frequency

func (*CheckRunning) Do

func (*CheckRunning) Init

func (s *CheckRunning) Init(ctx context.Context) error

type CheckStatus

type CheckStatus struct {
	operations.Base
	LeaderFailedCount int
	FailureThreshold  int
	// contains filtered or unexported fields
}

func (*CheckStatus) Do

func (*CheckStatus) Init

func (s *CheckStatus) Init(ctx context.Context) error

func (*CheckStatus) IsReadonly

func (s *CheckStatus) IsReadonly(ctx context.Context) bool

type FailoverManager added in v0.8.4

type FailoverManager interface {
	Failover(ctx context.Context, cluster *dcs.Cluster, candidate string) error
}

type GetLag

type GetLag struct {
	operations.Base
	// contains filtered or unexported fields
}

func (*GetLag) Do

func (*GetLag) Init

func (s *GetLag) Init(context.Context) error

func (*GetLag) IsReadonly

func (s *GetLag) IsReadonly(context.Context) bool

type GetRole

type GetRole struct {
	operations.Base
	// contains filtered or unexported fields
}

func (*GetRole) Do

func (*GetRole) Init

func (s *GetRole) Init(ctx context.Context) error

func (*GetRole) IsReadonly

func (s *GetRole) IsReadonly(ctx context.Context) bool

type Join

type Join struct {
	operations.Base

	Timeout time.Duration
	Command []string
	// contains filtered or unexported fields
}

func (*Join) Do

func (*Join) Init

func (s *Join) Init(ctx context.Context) error

type Leave

type Leave struct {
	operations.Base

	Timeout time.Duration
	Command []string
	// contains filtered or unexported fields
}

func (*Leave) Do

func (*Leave) Init

func (s *Leave) Init(ctx context.Context) error

type Rebuild added in v0.9.0

type Rebuild struct {
	operations.Base
	// contains filtered or unexported fields
}

func (*Rebuild) Do added in v0.9.0

func (*Rebuild) Init added in v0.9.0

func (s *Rebuild) Init(ctx context.Context) error

func (*Rebuild) IsReadonly added in v0.9.0

func (s *Rebuild) IsReadonly(ctx context.Context) bool

type Switchover

type Switchover struct {
	operations.Base
	// contains filtered or unexported fields
}

func (*Switchover) Do

func (*Switchover) Init

func (s *Switchover) Init(_ context.Context) error

func (*Switchover) PreCheck

func (s *Switchover) PreCheck(ctx context.Context, req *operations.OpsRequest) error

type SwitchoverManager

type SwitchoverManager interface {
	Switchover(ctx context.Context, cluster *dcs.Cluster, primary, candidate string, force bool) error
}

Jump to

Keyboard shortcuts

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