sentinel

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Restart

func Restart(sentinelStsName, namespace string, clientset *kubernetes.Clientset, restcfg *restclient.Config) error

func Sync

func Sync(slavePodName, masterPodName, containerName, namespace string, port int, clientset *kubernetes.Clientset, restcfg *restclient.Config, wait bool) error

Types

type MasterPod

type MasterPod struct {
	RedisPod
	NumSlaves int
	Slaves    []*SlavePod
}

func (*MasterPod) GetPodName

func (m *MasterPod) GetPodName() string

func (*MasterPod) PrettyPrint

func (m *MasterPod) PrettyPrint()

func (*MasterPod) String

func (m *MasterPod) String() string

type RedisPod

type RedisPod struct {
	Name          string
	Port          int
	Pod           *corev1.Pod
	ContainerName string
	IP            string
	RoleReported  string
	Flags         string
	PortForwarder *common.PortForwarder
	// contains filtered or unexported fields
}

func NewRedisPod

func NewRedisPod(podName, containerName, namespace string, port int, clientset *kubernetes.Clientset, restcfg *restclient.Config) (*RedisPod, error)

func (*RedisPod) IsSlave

func (r *RedisPod) IsSlave() (bool, error)

type SentinelPod

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

func NewSentinelPod

func NewSentinelPod(sentinelPodName string, sentinelContainerName string, namespace string, sentinelPort, redisPort int, clientset *kubernetes.Clientset, restcfg *restclient.Config) (*SentinelPod, error)

func (*SentinelPod) Check

func (s *SentinelPod) Check(name string) error

func (*SentinelPod) Failover

func (s *SentinelPod) Failover(name string) error

func (*SentinelPod) Info

func (s *SentinelPod) Info() error

func (*SentinelPod) Master

func (s *SentinelPod) Master(name string) error

func (*SentinelPod) Masters

func (s *SentinelPod) Masters() error

type SlavePod

type SlavePod struct {
	RedisPod
}

func (*SlavePod) GetDescription

func (s *SlavePod) GetDescription() (string, error)

func (*SlavePod) GetSyncStatus

func (s *SlavePod) GetSyncStatus() (slaveSyncInfo, error)

Jump to

Keyboard shortcuts

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