dtstruct

package
v0.0.0-...-6b32d26 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright 2021 SANGFOR TECHNOLOGIES

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenGaussInstance

type OpenGaussInstance struct {
	*dtstruct.Instance
	*SyncInfo
}

OpenGaussInstance hold opengauss instance basic info and sync info

func NewInstance

func NewInstance() *OpenGaussInstance

NewInstance creates a new, empty instance

func (*OpenGaussInstance) GetDatabaseType

func (o *OpenGaussInstance) GetDatabaseType() string

func (*OpenGaussInstance) GetHandler

func (o *OpenGaussInstance) GetHandler() dtstruct.InstanceAdaptor

func (*OpenGaussInstance) GetHostname

func (o *OpenGaussInstance) GetHostname() string

func (*OpenGaussInstance) GetInstance

func (o *OpenGaussInstance) GetInstance() *dtstruct.Instance

func (*OpenGaussInstance) GetPort

func (o *OpenGaussInstance) GetPort() int

func (*OpenGaussInstance) HumanReadableDescription

func (o *OpenGaussInstance) HumanReadableDescription() string

func (*OpenGaussInstance) IsReplica

func (o *OpenGaussInstance) IsReplica() bool

func (*OpenGaussInstance) IsReplicaServer

func (o *OpenGaussInstance) IsReplicaServer() bool

IsReplicaServer no replica server in opengauss like binlog server in mysql

func (*OpenGaussInstance) Less

func (o *OpenGaussInstance) Less(otherInst dtstruct.InstanceAdaptor, dataCenter string) bool

Less use replay location and promotion rule and physical location

func (*OpenGaussInstance) MarshalJSON

func (o *OpenGaussInstance) MarshalJSON() ([]byte, error)

func (*OpenGaussInstance) ReplicaRunning

func (o *OpenGaussInstance) ReplicaRunning() bool

ReplicaRunning instance should be replica and with valid last check and with valid upstream key

func (*OpenGaussInstance) SetFlavorName

func (o *OpenGaussInstance) SetFlavorName()

func (*OpenGaussInstance) SetHstPrtAndClusterName

func (o *OpenGaussInstance) SetHstPrtAndClusterName(hostname string, port int, upstreamHostname string, upstreamPort int, clusterName string)

func (*OpenGaussInstance) SetInstance

func (o *OpenGaussInstance) SetInstance(instance *dtstruct.Instance)

func (*OpenGaussInstance) SetPromotionRule

func (o *OpenGaussInstance) SetPromotionRule(rule dtstruct.CandidatePromotionRule)

type SyncInfo

type SyncInfo struct {
	SenderSentLocation       string
	SenderWriteLocation      string
	SenderFlushLocation      string
	SenderReplayLocation     string
	ReceiverReceivedLocation string
	ReceiverWriteLocation    string
	ReceiverFlushLocation    string
	ReceiverReplayLocation   string
	SyncPercent              int32
	Channel                  string
}

SyncInfo hold all info about sync

Jump to

Keyboard shortcuts

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