gxyrpc

package
v0.0.0-...-7e69858 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithMeta

func WithMeta(meta string) serviceOptionFunc

func WithName

func WithName(name string) serviceOptionFunc

Types

type RpcClient

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

func NewGrpcClient

func NewGrpcClient(configFile string) (*RpcClient, error)

func (*RpcClient) Broadcast

func (g *RpcClient) Broadcast(ctx context.Context, servicePath string, serviceMethod string, args interface{}, reply interface{}) error

func (*RpcClient) Call

func (g *RpcClient) Call(ctx context.Context, servicePath string, serviceMethod string, args interface{}, reply interface{}) error

func (*RpcClient) Close

func (g *RpcClient) Close() error

func (*RpcClient) DownloadFile

func (g *RpcClient) DownloadFile(ctx context.Context, requestFileName string, saveTo io.Writer, meta map[string]string) error

func (*RpcClient) Fork

func (g *RpcClient) Fork(ctx context.Context, servicePath string, serviceMethod string, args interface{}, reply interface{}) error

func (*RpcClient) Go

func (g *RpcClient) Go(ctx context.Context, servicePath string, serviceMethod string, args interface{}, reply interface{}, done chan *client.Call) (*client.Call, error)

func (*RpcClient) SendFile

func (g *RpcClient) SendFile(ctx context.Context, fileName string, rateInBytesPerSecond int64, meta map[string]string) error

func (*RpcClient) Stream

func (g *RpcClient) Stream(ctx context.Context, meta map[string]string) (net.Conn, error)

type RpcServer

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

func NewGrpcServer

func NewGrpcServer(configFile string) (*RpcServer, error)

func (*RpcServer) ReigsterService

func (g *RpcServer) ReigsterService(service interface{}, opts ...serviceOptionFunc) error

func (*RpcServer) Start

func (g *RpcServer) Start() error

func (*RpcServer) Stop

func (g *RpcServer) Stop() error

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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