replicasets

package
v0.0.0-...-7f7efcf Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoles

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

func BootstrapVshard

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

func Expel

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

func GetReplicasetRolesComp

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

func GetReplicasetRolesToAddComp

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

func Join

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

func List

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

func ListRoles

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

func ListVshardGroups

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

func RemoveRoles

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

func Save

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

func SetFailoverPriority

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

func SetWeight

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

func Setup

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

Types

type EditInstanceOpts

type EditInstanceOpts struct {
	InstanceUUID string `structs:"uuid,omitempty"`
	Expelled     bool   `structs:"expelled,omitempty"`
}

type EditInstancesListOpts

type EditInstancesListOpts []*EditInstanceOpts

func (*EditInstancesListOpts) ToMapsList

func (listOpts *EditInstancesListOpts) ToMapsList() []map[string]interface{}

type EditReplicasetOpts

type EditReplicasetOpts struct {
	ReplicasetUUID  string `structs:"uuid,omitempty"`
	ReplicasetAlias string `structs:"alias,omitempty"`

	Roles       []string `structs:"roles,omitempty"`
	AllRW       *bool    `structs:"all_rw,omitempty"`
	Weight      *float64 `structs:"weight,omitempty"`
	VshardGroup *string  `structs:"vshard_group,omitempty"`

	JoinInstances         []JoinInstanceOpts `structs:"join_servers,omitempty"`
	FailoverPriorityUUIDs []string           `structs:"failover_priority,omitempty"`
}

type EditReplicasetsListOpts

type EditReplicasetsListOpts []*EditReplicasetOpts

func (*EditReplicasetsListOpts) ToMapsList

func (listOpts *EditReplicasetsListOpts) ToMapsList() []map[string]interface{}

type GetNewRolesListFunc

type GetNewRolesListFunc func([]string, []string) []string

type JoinInstanceOpts

type JoinInstanceOpts struct {
	URI string `structs:"uri"`
}

type ReplicasetConf

type ReplicasetConf struct {
	Alias         string   `yaml:"alias,omitempty"`
	InstanceNames []string `yaml:"instances"`
	Roles         []string `yaml:"roles"`

	Weight      *float64 `yaml:"weight,omitempty"`
	AllRW       *bool    `yaml:"all_rw,omitempty"`
	VshardGroup *string  `yaml:"vshard_group,omitempty"`
}

type ReplicasetsConf

type ReplicasetsConf map[string]*ReplicasetConf

type ReplicasetsList

type ReplicasetsList []*ReplicasetConf

type Role

type Role struct {
	Name         string
	Dependencies []string
}

func (*Role) DecodeMsgpack

func (role *Role) DecodeMsgpack(d *msgpack.Decoder) error

func (*Role) String

func (role *Role) String() string

type Roles

type Roles []*Role

type TopologyInstance

type TopologyInstance struct {
	Alias string
	UUID  string
	URI   string

	Zone string

	Expelled bool
}

type TopologyInstances

type TopologyInstances []*TopologyInstance

type TopologyReplicaset

type TopologyReplicaset struct {
	UUID string

	Alias  string
	Status string
	Roles  []string

	AllRW       *bool `mapstructure:"all_rw"`
	Weight      *float64
	VshardGroup *string `mapstructure:"vshard_group"`

	Instances  TopologyInstances
	LeaderUUID string `mapstructure:"leader_uuid"`
}

func (*TopologyReplicaset) DecodeMsgpack

func (topologyReplicaset *TopologyReplicaset) DecodeMsgpack(d *msgpack.Decoder) error

type TopologyReplicasets

type TopologyReplicasets map[string]*TopologyReplicaset

func (*TopologyReplicasets) GetByAlias

func (topologyReplicasets *TopologyReplicasets) GetByAlias(alias string) *TopologyReplicaset

func (*TopologyReplicasets) GetSomeReplicaset

func (topologyReplicasets *TopologyReplicasets) GetSomeReplicaset() *TopologyReplicaset

Jump to

Keyboard shortcuts

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