proxy

package
v2.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticSearch

type ElasticSearch struct {
	*elasticsearch.Client
}

ElasticSearch ...

func NewElasticSearch

func NewElasticSearch() *ElasticSearch

NewElasticSearch 缓存

func (*ElasticSearch) Store

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

Store 设置写库

type Grpc

type Grpc struct {
	*grpc.ClientConn
}

Grpc ...

func NewGrpc

func NewGrpc() *Grpc

NewGrpc 缓存

func (*Grpc) Store

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

Store 设置写库

type MongoDB

type MongoDB struct {
	*mongodb.MongoDB
}

MongoDB ...

func NewMongoDB

func NewMongoDB() *MongoDB

NewMongoDB 缓存

func (*MongoDB) Store

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

Store 设置写库

type Proxy

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

Proxy 代理池

func NewProxy

func NewProxy() *Proxy

NewProxy 代理池

func (*Proxy) LoadElasticSearch

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

LoadElasticSearch LoadEs 获取分组

func (*Proxy) LoadGrpc

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

LoadGrpc Load 获取分组

func (*Proxy) LoadMongoDB

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

LoadMongoDB LoadNoSQL 获取分组

func (*Proxy) LoadRedis

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

LoadRedis LoadCache 获取分组

func (*Proxy) LoadSQL

func (proxypool *Proxy) LoadSQL(group string) *SQL

LoadSQL 获取分组

func (*Proxy) StoreElasticSearch

func (proxypool *Proxy) StoreElasticSearch(group string, proxy *ElasticSearch)

StoreElasticSearch StoreEs 设置组

func (*Proxy) StoreGrpc

func (proxypool *Proxy) StoreGrpc(group string, proxy *Grpc)

StoreGrpc Store 设置组

func (*Proxy) StoreMongoDB

func (proxypool *Proxy) StoreMongoDB(group string, proxy *MongoDB)

StoreMongoDB StoreNoSQL 设置组

func (*Proxy) StoreRedis

func (proxypool *Proxy) StoreRedis(group string, proxy *Redis)

StoreRedis StoreCache 设置组

func (*Proxy) StoreSQL

func (proxypool *Proxy) StoreSQL(group string, proxy *SQL)

StoreSQL 设置组

type Redis

type Redis struct {
	*redis.Client
}

Redis ...

func NewRedis

func NewRedis() *Redis

NewRedis 缓存

func (*Redis) Store

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

Store 设置写库

type SQL

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

SQL Proxy 代理

func NewSQL

func NewSQL() *SQL

NewSQL 代理池

func (*SQL) Read

func (proxy *SQL) Read() *query.Query

Read 获取读库

func (*SQL) SetRead

func (proxy *SQL) SetRead(query *query.Query)

SetRead 设置读库

func (*SQL) SetWrite

func (proxy *SQL) SetWrite(query *query.Query)

SetWrite 设置写库

func (*SQL) Write

func (proxy *SQL) Write() *query.Query

Write 获取写库

Jump to

Keyboard shortcuts

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