Documentation
¶
Overview ¶
client client端,主要包含client端调用的核心内容.
Index ¶
- Variables
- func New(o *Options) *defaultClient
- type Client
- type Option
- func WithAddr(addr string) Option
- func WithAfterHandle(h []interceptor.ClientInvoker) Option
- func WithBeforeHandle(h []interceptor.ClientInvoker) Option
- func WithClientName(clientName string) Option
- func WithCodecType(codecType string) Option
- func WithCompressType(compressType string) Option
- func WithDisableConnPool(b bool) Option
- func WithEnableMultiplexed(b bool) Option
- func WithMethod(methodName string) Option
- func WithNetWork(network string) Option
- func WithPluginFactory(p *plugin.Factory) Option
- func WithPluginFactoryOptions(o []plugin.Option) Option
- func WithSerializerType(serializerType string) Option
- func WithService(serviceName string) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorServiceNotExist = errors.New("service not exist")
ErrorServiceNotExist 服务不存在错误.
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
func WithAfterHandle ¶
func WithAfterHandle(h []interceptor.ClientInvoker) Option
func WithBeforeHandle ¶
func WithBeforeHandle(h []interceptor.ClientInvoker) Option
func WithClientName ¶
func WithCodecType ¶
func WithCompressType ¶
func WithDisableConnPool ¶
func WithEnableMultiplexed ¶
func WithMethod ¶
func WithNetWork ¶
func WithPluginFactory ¶
func WithSerializerType ¶
func WithService ¶
type Options ¶
type Options struct {
ClientName string `yaml:"name"`
Addr string `yaml:"address"`
SerializerType string `yaml:"serializer"`
CodecType string `yaml:"codec"`
EnableMultiplexed bool `yaml:"enable_multiplexed"`
DisableConnPool bool `yaml:"disable_connection_pool"`
NetWork string `yaml:"network"`
CompressType string `yaml:"compress"`
PluginFactoryOptions []plugin.Option
PluginFactory *plugin.Factory
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.