remote

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewGrpcServer

func CreateNewGrpcServer(
	store m3.Storage,
	poolWrapper *pools.PoolWrapper,
) *grpc.Server

CreateNewGrpcServer builds a grpc server which must be started later

func DecodeCompressedFetchResponse added in v0.4.5

func DecodeCompressedFetchResponse(
	fetchResult *rpc.FetchResponse,
	iteratorPools encoding.IteratorPools,
) (encoding.SeriesIterators, error)

DecodeCompressedFetchResponse decodes compressed fetch response to seriesIterators

func DecodeDecompressedFetchResult added in v0.4.5

func DecodeDecompressedFetchResult(
	name string,
	rpcSeries []*rpc.DecompressedSeries,
) ([]*ts.Series, error)

DecodeDecompressedFetchResult decodes fetch results from a GRPC-compatible type.

func DecodeFetchRequest added in v0.4.5

func DecodeFetchRequest(
	req *rpc.FetchRequest,
) (*storage.FetchQuery, error)

DecodeFetchRequest decodes rpc fetch request to read query and read options

func EncodeFetchRequest added in v0.4.5

func EncodeFetchRequest(
	query *storage.FetchQuery,
) (*rpc.FetchRequest, error)

EncodeFetchRequest encodes fetch request into rpc FetchRequest

func EncodeFetchResult

func EncodeFetchResult(results *storage.FetchResult) *rpc.FetchResponse

EncodeFetchResult encodes fetch result to rpc response

func EncodeMetadata added in v0.4.5

func EncodeMetadata(ctx context.Context, requestID string) context.Context

EncodeMetadata creates a context that propagates request metadata as well as requestID

func EncodeToCompressedFetchResult

func EncodeToCompressedFetchResult(
	iterators encoding.SeriesIterators,
	iterPools encoding.IteratorPools,
) (*rpc.FetchResponse, error)

EncodeToCompressedFetchResult encodes SeriesIterators to compressed fetch response

func RetrieveMetadata added in v0.4.5

func RetrieveMetadata(streamCtx context.Context) context.Context

RetrieveMetadata creates a context with propagated request metadata as well as requestID

func StartNewGrpcServer

func StartNewGrpcServer(
	server *grpc.Server,
	address string,
	waitForStart chan<- struct{},
) error

StartNewGrpcServer starts server on given address, then notifies channel

Types

type Client

type Client interface {
	storage.Querier
	Close() error
}

Client is the grpc client

func NewGrpcClient

func NewGrpcClient(
	addresses []string,
	poolWrapper *pools.PoolWrapper,
	workerPool pool.ObjectPool,
	additionalDialOpts ...grpc.DialOption,
) (Client, error)

NewGrpcClient creates grpc client

Jump to

Keyboard shortcuts

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