rpc

package
v0.0.0-...-ba4a4a7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	IsLogCalls        bool
	OnConnectionError func(err error)

	Latency      time.Duration
	BandWithMpbs float32
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) Close

func (t *Client) Close()

func (*Client) Connect

func (t *Client) Connect(uri string) error

func (*Client) Interrupt

func (t *Client) Interrupt()

func (*Client) NewServiceClient

func (t *Client) NewServiceClient(serviceName string) ServiceClient

type Server

type Server struct {
	URL       string
	EventsURL string
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Close

func (t *Server) Close()

func (*Server) PostEvent

func (t *Server) PostEvent(id string, event interface{})

func (*Server) RegisterService

func (t *Server) RegisterService(serviceName string, service interface{}) error

func (*Server) Serve

func (t *Server) Serve() error

func (*Server) Start

func (t *Server) Start(uri, eventsPath string) error

type ServiceClient

type ServiceClient interface {
	Call(arg interface{}, rsp interface{}) error
}

Jump to

Keyboard shortcuts

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