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

          Source Files