remote

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 9 Imported by: 0

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

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(s component.ServerImpl)

func (*Remote) OnRun

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

func (*Remote) RegisterHandler

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

func (*Remote) RegisterName

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

Jump to

Keyboard shortcuts

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