proxy

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	GetCfg(key ...string) interface{}
}

type DBMongo

type DBMongo interface {
	GetDB(name ...string) *mongo.Database
}

type DBMySQL

type DBMySQL interface {
	GetDB(name ...string) *sql.DB
}

type DBRedis

type DBRedis interface {
	GetDB(name ...string) redis.Conn
}

type Discovery

type Discovery interface {
	Instance() naming_client.INamingClient
	ClusterName() string
}

type MQ

type MQ interface {
	SendMsg(ctx context.Context, name string, topic string, msg []byte) error
	SendMsgSharding(ctx context.Context, name string, key string, topic string, msg []byte) error
}

type RpcClient

type RpcClient interface {
	WithHashKey(ctx context.Context, val string) context.Context
	WithSoftStateKey(ctx context.Context, val string) context.Context
	Invoke(ctx context.Context, method string, args interface{}, reply interface{}) error
	OneWay(ctx context.Context, method string, args interface{}) error
	Broadcast(ctx context.Context, method string, args interface{}, reply interface{}) error
	Callback(ctx context.Context, method string, args interface{}, reply interface{}, f func(reply interface{}, err error))
}

type RpcClientPool

type RpcClientPool interface {
	GetClient(name string, serviceName string) (RpcClient, error)
	GetClientHash(name string, serviceName string) (RpcClient, error)
	GetClientSoftState(name string, serviceName string) (RpcClient, error)
}

Jump to

Keyboard shortcuts

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