repair

package
v0.0.0-...-4ba0521 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllInstanceUUIDsComp

func GetAllInstanceUUIDsComp(ctx *context.Ctx) ([]string, error)

func GetAllReplicasetUUIDsComp

func GetAllReplicasetUUIDsComp(ctx *context.Ctx) ([]string, error)

func GetInstanceHostsComp

func GetInstanceHostsComp(instanceUUID string, ctx *context.Ctx) ([]string, error)

func GetReplicasetInstancesComp

func GetReplicasetInstancesComp(replicasetUUID string, ctx *context.Ctx) ([]string, error)

func List

func List(ctx *context.Ctx) error

func PatchURI

func PatchURI(ctx *context.Ctx) error

func RemoveInstance

func RemoveInstance(ctx *context.Ctx) error

func Run

func Run(processConfFunc ProcessConfFuncType, ctx *context.Ctx, patchConf bool) error

func SetLeader

func SetLeader(ctx *context.Ctx) error

Types

type AppConfigs

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

func (*AppConfigs) AreDifferent

func (d *AppConfigs) AreDifferent() bool

func (*AppConfigs) GetDiffs

func (d *AppConfigs) GetDiffs() (string, error)

type InstanceConfType

type InstanceConfType struct {
	AdvertiseURI   string `mapstructure:"uri"`
	ReplicasetUUID string `mapstructure:"replicaset_uuid"`

	IsExpelled bool
	IsDisabled bool `mapstructure:"disabled"`

	Raw RawConfType
}

type PatchConfFuncType

type PatchConfFuncType func(topologyConf *TopologyConfType, ctx *context.Ctx) error

type ProcessConfFuncType

type ProcessConfFuncType func(topologyConf *TopologyConfType, ctx *context.Ctx) ([]common.ResultMessage, error)

type RawConfType

type RawConfType map[interface{}]interface{}

type ReplicasetConfType

type ReplicasetConfType struct {
	Alias    string          `mapstructure:"alias"`
	Leaders  []string        `mapstructure:"master"`
	RolesMap map[string]bool `mapstructure:"roles"`

	Instances []string

	Raw RawConfType

	LeadersIsString bool
}

func (*ReplicasetConfType) SetInstances

func (replicasetConf *ReplicasetConfType) SetInstances(newInstances []string)

func (*ReplicasetConfType) SetLeaders

func (replicasetConf *ReplicasetConfType) SetLeaders(newLeaders []string)

type TopologyConfFileInfo

type TopologyConfFileInfo struct {
	Path      string
	IsOneFile bool
}

type TopologyConfType

type TopologyConfType struct {
	Instances map[string]*InstanceConfType

	Replicasets map[string]*ReplicasetConfType
	// contains filtered or unexported fields
}

func (*TopologyConfType) GetOrderedInstaceUUIDs

func (topologyConf *TopologyConfType) GetOrderedInstaceUUIDs() []string

func (*TopologyConfType) GetOrderedReplicasetUUIDs

func (topologyConf *TopologyConfType) GetOrderedReplicasetUUIDs() []string

func (*TopologyConfType) MarshalContent

func (topologyConf *TopologyConfType) MarshalContent() ([]byte, error)

func (*TopologyConfType) RemoveInstance

func (topologyConf *TopologyConfType) RemoveInstance(instanceUUID string) error

func (*TopologyConfType) RemoveReplicaset

func (topologyConf *TopologyConfType) RemoveReplicaset(replicasetUUID string) error

func (*TopologyConfType) SetInstanceURI

func (topologyConf *TopologyConfType) SetInstanceURI(instanceUUID, newURI string) error

Jump to

Keyboard shortcuts

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