remote

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func Addr

func Addr(s string) Option

Address of rpc service

func BasePath

func BasePath(s string) Option

Base path of rpc service

func RegistryAddr

func RegistryAddr(s string) Option

Address of register service

func RegistryType

func RegistryType(s string) Option

Register service type. option is consul, etcd, etcdv3, zookeeper.

type Options

type Options struct {
	Addr         string
	RegistryType string
	RegistryAddr string
	BasePath     string
}

type RegisterPlugin added in v1.0.1

type RegisterPlugin interface {
	Start() error
}

type Remote

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

func NewRemote

func NewRemote(opts ...Option) *Remote

func (*Remote) GetRemoteAddrs

func (r *Remote) GetRemoteAddrs() string

func (*Remote) OnDestroy

func (r *Remote) OnDestroy()

func (*Remote) OnInit

func (r *Remote) OnInit()

func (*Remote) RegisterHandler

func (r *Remote) RegisterHandler(rcvr interface{}, metadata string) error

func (*Remote) RegisterName added in v1.0.1

func (r *Remote) RegisterName(nodeId string, rcvr interface{}, metadata string) error

func (*Remote) Run

func (r *Remote) Run(closeSig chan bool)

Jump to

Keyboard shortcuts

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