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 ¶
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