// RegisterTripServiceHandlerFromEndpoint is same as RegisterTripServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
RegisterTripServiceHandlerFromEndpoint is same as RegisterTripServiceHandler but
automatically dials to "endpoint" and closes the connection when "ctx" gets done.
// RegisterTripServiceHandlerFromEndpoint is same as RegisterTripServiceHandler but // automatically dials to " endpoint " and closes the connection when " ctx " gets done .
func RegisterTripServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
	conn, err := grpc.Dial(endpoint, opts...)
	if err != nil {
		return err
	}
	defer func() {
		if err != nil {
			if cerr := conn.Close(); cerr != nil {
				grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
			}
			return
		}
		go func() {
			<-ctx.Done()
			if cerr := conn.Close(); cerr != nil {
				grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
			}
		}()
	}()
	return RegisterTripServiceHandler(ctx, mux, conn)
}
func RegisterTripServiceHandlerFromEndpoint ( ctx context . Context , mux * runtime . ServeMux , endpoint string , opts [ ] grpc . DialOption ) ( err error ) { conn , err := grpc . Dial ( endpoint , opts ... ) if err != nil { return err } defer func ( ) { if err != nil { if cerr := conn . Close ( ) ; cerr != nil { grpclog . Infof ( " " , endpoint , cerr ) } return } go func ( ) { <- ctx . Done ( ) if cerr := conn . Close ( ) ; cerr != nil { grpclog . Infof ( " " , endpoint , cerr ) } } ( ) } ( ) return RegisterTripServiceHandler ( ctx , mux , conn ) }
RegisterTripServiceHandlerFromEndpoint is same as RegisterTripServiceHandler but
automatically dials to "endpoint" and closes the connection when "ctx" gets done.
RegisterTripServiceHandlerFromEndpoint is same as RegisterTripServiceHandler but automatically dials to " endpoint " and closes the connection when " ctx " gets done .