queries

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	WriterHostgroup = "writer_hostgroup"
	ReaderHostgroup = "reader_hostgroup"
)

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Database

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

func New

func New(client client.Client, namespace, secretName, user, host string, port int32, timeout int32) (Database, error)

func (*Database) AddReplicationSource added in v1.9.0

func (p *Database) AddReplicationSource(name, host string, port, weight int) error

func (*Database) ChangeChannelPassword added in v1.10.0

func (p *Database) ChangeChannelPassword(channel, password string) error

func (*Database) Close

func (p *Database) Close() error

func (*Database) CurrentReplicationChannels added in v1.9.0

func (p *Database) CurrentReplicationChannels() ([]string, error)

func (*Database) DeleteReplicationSource added in v1.9.0

func (p *Database) DeleteReplicationSource(name, host string, port int) error

func (*Database) DisableReadonly added in v1.9.0

func (p *Database) DisableReadonly() error

func (*Database) EnableReadonly added in v1.9.0

func (p *Database) EnableReadonly() error

func (*Database) Hostname

func (p *Database) Hostname() (string, error)

func (*Database) IsReadonly added in v1.9.0

func (p *Database) IsReadonly() (bool, error)

func (*Database) PresentInHostgroups added in v1.11.0

func (p *Database) PresentInHostgroups(host string) (bool, error)

func (*Database) PrimaryHost

func (p *Database) PrimaryHost() (string, error)

func (*Database) ProxySQLInstanceStatus added in v1.11.0

func (p *Database) ProxySQLInstanceStatus(host string) ([]string, error)

func (*Database) ReadVariable added in v1.14.0

func (p *Database) ReadVariable(variable string) (string, error)

func (*Database) ReplicationChannelSources added in v1.9.0

func (p *Database) ReplicationChannelSources(channelName string) ([]ReplicationChannelSource, error)

func (*Database) ReplicationStatus added in v1.9.0

func (p *Database) ReplicationStatus(ctx context.Context, channel string) (ReplicationStatus, error)

func (*Database) ShowReplicaStatus added in v1.14.0

func (p *Database) ShowReplicaStatus(ctx context.Context, channel string) (map[string]string, error)

func (*Database) StartReplication added in v1.9.0

func (p *Database) StartReplication(replicaPass string, config ReplicationConfig, shouldGetMasterKey bool) error

func (*Database) StopAllReplication added in v1.9.0

func (p *Database) StopAllReplication() error

func (*Database) StopReplication added in v1.9.0

func (p *Database) StopReplication(name string) error

func (*Database) Version

func (p *Database) Version() (string, error)

func (*Database) WsrepLocalStateComment

func (p *Database) WsrepLocalStateComment() (string, error)

type ReplicationChannelSource added in v1.9.0

type ReplicationChannelSource struct {
	Name   string
	Host   string
	Port   int
	Weight int
}

type ReplicationConfig added in v1.10.0

type ReplicationConfig struct {
	Source             ReplicationChannelSource
	SourceRetryCount   uint
	SourceConnectRetry uint
	SSL                bool
	SSLSkipVerify      bool
	CA                 string
}

type ReplicationStatus added in v1.9.0

type ReplicationStatus int8
const (
	ReplicationStatusActive ReplicationStatus = iota
	ReplicationStatusError
	ReplicationStatusNotInitiated
)

Jump to

Keyboard shortcuts

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