Documentation ¶
Index ¶
- Constants
- func DIUnaryInterceptor[T any](key string, provide func() T) grpc.UnaryServerInterceptor
- func Serve(configs Configs, services []ServiceRegister, options []grpc.ServerOption)
- func UnaryContextMetadataInterceptor() grpc.UnaryServerInterceptor
- func UnaryWrapErrorInterceptor() grpc.UnaryServerInterceptor
- type Configs
- type Connection
- type ServiceRegister
Constants ¶
View Source
const (
Platform = "gRPC"
)
Variables ¶
This section is empty.
Functions ¶
func DIUnaryInterceptor ¶
func DIUnaryInterceptor[T any](key string, provide func() T) grpc.UnaryServerInterceptor
func Serve ¶
func Serve(configs Configs, services []ServiceRegister, options []grpc.ServerOption)
func UnaryContextMetadataInterceptor ¶
func UnaryContextMetadataInterceptor() grpc.UnaryServerInterceptor
func UnaryWrapErrorInterceptor ¶
func UnaryWrapErrorInterceptor() grpc.UnaryServerInterceptor
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(target string) *Connection
func NewInternalConnection ¶
func NewInternalConnection(configs Configs) *Connection
func (*Connection) Invoke ¶
func (c *Connection) Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error
func (*Connection) NewStream ¶
func (c *Connection) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)
type ServiceRegister ¶
Click to show internal directories.
Click to hide internal directories.