proxy

package
v3.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyElasticSearch

type ProxyElasticSearch struct {
	*elasticsearch.Client
}

func NewProxyElasticSearch

func NewProxyElasticSearch() *ProxyElasticSearch

NewProxyElasticSearch 缓存

func (*ProxyElasticSearch) Store

func (proxy *ProxyElasticSearch) Store(client *elasticsearch.Client)

Store 设置写库

type ProxyGrpc added in v3.0.3

type ProxyGrpc struct {
	*grpc.ClientConn
}

func NewProxyGrpc added in v3.0.3

func NewProxyGrpc() *ProxyGrpc

NewProxyGrpc 缓存

func (*ProxyGrpc) Store added in v3.0.3

func (proxy *ProxyGrpc) Store(client *grpc.ClientConn)

Store 设置写库

type ProxyMongoDB

type ProxyMongoDB struct {
	*mongodb.MongoDB
}

func NewProxyMongoDB

func NewProxyMongoDB() *ProxyMongoDB

NewProxyMongoDB 缓存

func (*ProxyMongoDB) Store

func (proxy *ProxyMongoDB) Store(client *mongodb.MongoDB)

Store 设置写库

type ProxyPool

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

ProxyPool 代理池

func NewProxyPool

func NewProxyPool() *ProxyPool

NewProxyPool 代理池

func (*ProxyPool) LoadElasticSearch

func (proxypool *ProxyPool) LoadElasticSearch(group string) *elasticsearch.Client

LoadEs 获取分组

func (*ProxyPool) LoadGrpc added in v3.0.3

func (proxypool *ProxyPool) LoadGrpc(group string) *grpc.ClientConn

Load 获取分组

func (*ProxyPool) LoadMongoDB

func (proxypool *ProxyPool) LoadMongoDB(group string) *mongodb.MongoDB

LoadNoSQL 获取分组

func (*ProxyPool) LoadRedis

func (proxypool *ProxyPool) LoadRedis(group string) *redis.Client

LoadCache 获取分组

func (*ProxyPool) LoadSQL

func (proxypool *ProxyPool) LoadSQL(group string) *ProxySQL

LoadSQL 获取分组

func (*ProxyPool) StoreElasticSearch

func (proxypool *ProxyPool) StoreElasticSearch(group string, proxy *ProxyElasticSearch)

StoreEs 设置组

func (*ProxyPool) StoreGrpc added in v3.0.3

func (proxypool *ProxyPool) StoreGrpc(group string, proxy *ProxyGrpc)

Store 设置组

func (*ProxyPool) StoreMongoDB

func (proxypool *ProxyPool) StoreMongoDB(group string, proxy *ProxyMongoDB)

StoreNoSQL 设置组

func (*ProxyPool) StoreRedis

func (proxypool *ProxyPool) StoreRedis(group string, proxy *ProxyRedis)

StoreCache 设置组

func (*ProxyPool) StoreSQL

func (proxypool *ProxyPool) StoreSQL(group string, proxy *ProxySQL)

StoreSQL 设置组

type ProxyRedis

type ProxyRedis struct {
	*redis.Client
}

func NewProxyRedis

func NewProxyRedis() *ProxyRedis

NewProxyRedis 缓存

func (*ProxyRedis) Store

func (proxy *ProxyRedis) Store(client *redis.Client)

Store 设置写库

type ProxySQL

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

Proxy 代理

func NewProxySQL

func NewProxySQL() *ProxySQL

NewProxySQL 代理池

func (*ProxySQL) Read

func (proxy *ProxySQL) Read() *query.QueryDb

Read 获取读库

func (*ProxySQL) SetRead

func (proxy *ProxySQL) SetRead(query *query.QueryDb)

SetRead 设置读库

func (*ProxySQL) SetWrite

func (proxy *ProxySQL) SetWrite(query *query.QueryDb)

SetWrite 设置写库

func (*ProxySQL) Write

func (proxy *ProxySQL) Write() *query.QueryDb

Write 获取写库

Jump to

Keyboard shortcuts

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