proxy

package
v0.0.0-...-acb9878 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Addr                string   `json:"addr"`
	AddrNotify          string   `json:"addrNotify"`
	WatcherHeartbeatSec int      `json:"watcherHeartbeatSec"`
	PDAddrs             []string `json:"pdAddrs"`
	MaxRetries          int      `json:"maxRetries"`
	RetryDuration       int64    `json:"retryDuration"`
	WorkerCount         uint64   `json:"workerCount"`
	SupportCMDs         []string `json:"supportCMDs"`
}

Cfg returns cfg for proxy

func GetCfg

func GetCfg() *Cfg

GetCfg get cfg from command

type RedisProxy

type RedisProxy struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

RedisProxy is a redis proxy

func NewRedisProxy

func NewRedisProxy(cfg *Cfg) *RedisProxy

NewRedisProxy returns a redisp proxy

func (*RedisProxy) Start

func (p *RedisProxy) Start() error

Start starts the proxy

func (*RedisProxy) Stop

func (p *RedisProxy) Stop()

Stop stop the proxy

Jump to

Keyboard shortcuts

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