grpc

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Dial variable
	Dial = grpc.Dial
)

Functions

func CreateServer added in v0.0.5

func CreateServer(logger *zap.Logger, grpcOption config.GRPC, authenticateService services.IAuthenticate) *grpc.Server

Types

type IClientConn

type IClientConn interface {
	WaitForStateChange(ctx context.Context, sourceState connectivity.State) bool
	GetState() connectivity.State
	Target() string
	GetMethodConfig(method string) grpc.MethodConfig
	ResetConnectBackoff()
	Close() error
	NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)
	Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error
}

IClientConn interface

func CreateClient

func CreateClient(domain string, option config.GRPC) (IClientConn, error)

CreateClient method

type IRegister

type IRegister interface {
	Handler(*grpc.Server)
}

IRegister interface

type IService

type IService interface {
	GetSession() (IClientConn, error)
	Close() error
}

IService interface

Jump to

Keyboard shortcuts

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