grpc

package
v0.0.0-...-50a54d8 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientConn

func NewClientConn(etcdCli *etcd.Client, serviceName string, profile string) (*grpc.ClientConn, error)

NewClientConn new grpc client connection use etcd balancer

func RegisterService

func RegisterService(etcdCli *etcd.Client, serviceName string, profile string, hostPort string, ttl int64)

RegisterService register service to etcd and keep alive

func SignalHandler

func SignalHandler(server *grpc.Server, closeClient CloseClient)

SignalHandler check signal for grpceful stop

Types

type CloseClient

type CloseClient func()

CloseClient close clients' connections

Jump to

Keyboard shortcuts

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