transport

package
v0.0.0-...-02b4230 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

*

*
* @author liangjf
* @create on 2020/6/4
* @version 1.0

*

*
* @author liangjf
* @create on 2020/5/20
* @version 1.0

*

*
* @author liangjf
* @create on 2020/6/4
* @version 1.0

*

*
* @author liangjf
* @create on 2020/5/21
* @version 1.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryRPCTransport

type FactoryRPCTransport struct{}

type IFactory

type IFactory interface {
	CreateTransport() ITransport
}

type ITransport

type ITransport interface {
	Init(...Option)
	ListenServer(context.Context) error
}

func NewFactoryRPCTransport

func NewFactoryRPCTransport(opts ...Option) ITransport

func NewRpcTransport

func NewRpcTransport(opts ...Option) ITransport

type Option

type Option func(*Options)

func Addr

func Addr(addr string) Option

func DiscoveryAddr

func DiscoveryAddr(DiscoveryAddr []string) Option

func Network

func Network(network string) Option

func RedisHost

func RedisHost(redisHost []string) Option

func RpcPort

func RpcPort(rpcPort int) Option

func SrvName

func SrvName(SrvName string) Option

type Options

type Options struct {
	Addr          string
	Network       string
	RpcPort       int
	DiscoveryAddr []string
	SrvName       string
	RedisHost     []string
}

Jump to

Keyboard shortcuts

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