client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright (c) 2017-2018 Uber Technologies, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedToConnect = errors.New("Datanode query client failed to connect")

Functions

This section is empty.

Types

type DataNodeQueryClient

type DataNodeQueryClient interface {
	// used for agg query
	Query(ctx context.Context, requestID string, host topology.Host, query queryCom.AQLQuery, hll bool) (queryCom.AQLQueryResult, error)
	// used for non agg query, header is left out, only matrixData returned as raw bytes
	QueryRaw(ctx context.Context, requestID string, host topology.Host, query queryCom.AQLQuery) ([]byte, error)
}

func NewDataNodeQueryClient

func NewDataNodeQueryClient() DataNodeQueryClient

type Peer

type Peer interface {
	BorrowConnection(fn WithConnectionFn) error
	Close()
	Host() topology.Host
}

type PeerConnDialer

type PeerConnDialer func(target string, opts ...grpc.DialOption) (client rpc.PeerDataNodeClient, closeFn func() error, err error)

PeerConnDialer defines the dial function for PeerDataNodeClient

type PeerSource

type PeerSource interface {
	// BorrowConnection will borrow a connection and execute a user function.
	BorrowConnection(hostIDs []string, fn WithConnectionFn) error
	Close()
}

PeerSource represent a peer source which manages peer connections

type WithConnectionFn

type WithConnectionFn func(peerID string, client rpc.PeerDataNodeClient)

WithConnectionFn defines function with PeerDataNodeClient

Directories

Path Synopsis
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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