xjrpc

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EtcdServers []string
)

Functions

This section is empty.

Types

type Client

type Client struct {
	EtcdEndpoints []string
}

func (*Client) Call

func (this *Client) Call(basePath, servicePath string, args interface{}, reply interface{}) (err error)

func (*Client) EtcdList added in v0.7.4

func (this *Client) EtcdList(key string) []string

func (*Client) GetAddress

func (this *Client) GetAddress(basePath string) string

func (*Client) GetAddress2 added in v0.7.4

func (this *Client) GetAddress2(basePath string) string

type EtcdRegister

type EtcdRegister struct {
	// service address, for example, tcp@127.0.0.1:8972, quic@127.0.0.1:1234
	ServiceAddress string
	// etcd addresses
	EtcdServers []string
	// base path for rpcx server, for example com/example/rpcx
	BasePath string
	Metrics  metrics.Registry
	// Registered services
	Services []string

	UpdateInterval time.Duration
	LeaseTime      int
	ServiceReg     *xjregister.ServiceReg
	RpcAddress     string

	Options *store.Config
	// contains filtered or unexported fields
}

type Server

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

func NewServer

func NewServer() *Server

func (*Server) EtcdRegister

func (s *Server) EtcdRegister(etcdRegister EtcdRegister)

func (*Server) RegisterName

func (s *Server) RegisterName(name string, rcvr interface{}, metadata string) error

func (*Server) Serve

func (s *Server) Serve(network, address string) (err error)

Jump to

Keyboard shortcuts

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