grpcx

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 7 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 interface {
	AddDailOptions(...grpc.DialOption)
	AddUnaryInterceptor(interceptor ...grpc.UnaryClientInterceptor)
	AddStreamInterceptor(interceptor ...grpc.StreamClientInterceptor)
	Dial() (*grpc.ClientConn, error)
	DialWithCall(ClientCallFunc) (any, error)
	Conn() *grpc.ClientConn
	Close()
}

func NewClient

func NewClient(conf *ClientConfig) Client

type ClientCallFunc

type ClientCallFunc func(*grpc.ClientConn) (any, error)

type ClientConfig

type ClientConfig struct {
	Addr   string
	Secure bool
	Trace  bool
}

type ClientEntity

type ClientEntity struct {
	*ClientConfig
	// contains filtered or unexported fields
}

func (*ClientEntity) AddDailOptions

func (c *ClientEntity) AddDailOptions(dialOption ...grpc.DialOption)

func (*ClientEntity) AddStreamInterceptor

func (c *ClientEntity) AddStreamInterceptor(interceptor ...grpc.StreamClientInterceptor)

func (*ClientEntity) AddUnaryInterceptor

func (c *ClientEntity) AddUnaryInterceptor(interceptor ...grpc.UnaryClientInterceptor)

func (*ClientEntity) Close

func (c *ClientEntity) Close()

func (*ClientEntity) Conn

func (c *ClientEntity) Conn() *grpc.ClientConn

func (*ClientEntity) Dial

func (c *ClientEntity) Dial() (conn *grpc.ClientConn, err error)

func (*ClientEntity) DialWithCall

func (c *ClientEntity) DialWithCall(call ClientCallFunc) (any, error)

type Server

type Server interface {
	AddServerOptions(serverOption ...grpc.ServerOption)
	AddUnaryInterceptor(interceptor ...grpc.UnaryServerInterceptor)
	AddStreamInterceptor(interceptor ...grpc.StreamServerInterceptor)
	Start(ServerRegisterFunc) error
	Engine() *grpc.Server
	Shutdown() error
}

func NewServer

func NewServer(conf *ServerConfig) Server

type ServerConfig

type ServerConfig struct {
	Addr  string
	Trace bool
}

type ServerEntity

type ServerEntity struct {
	*ServerConfig
	// contains filtered or unexported fields
}

func (*ServerEntity) AddServerOptions

func (s *ServerEntity) AddServerOptions(serverOption ...grpc.ServerOption)

func (*ServerEntity) AddStreamInterceptor

func (s *ServerEntity) AddStreamInterceptor(interceptor ...grpc.StreamServerInterceptor)

func (*ServerEntity) AddUnaryInterceptor

func (s *ServerEntity) AddUnaryInterceptor(interceptor ...grpc.UnaryServerInterceptor)

func (*ServerEntity) Engine

func (s *ServerEntity) Engine() *grpc.Server

func (*ServerEntity) Shutdown

func (s *ServerEntity) Shutdown() error

func (*ServerEntity) Start

func (s *ServerEntity) Start(register ServerRegisterFunc) (err error)

type ServerRegisterFunc

type ServerRegisterFunc func(*grpc.Server)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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