grpc

package
v0.9.28 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Overview

Package GRPC incorporate GRPC interface of worker allows it to accept new streams and forward messages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(workerContext context.Context, taskStream indexer.IndexerService_TaskRPCServer, accessCh *cStructs.StreamAccess, logger *zap.Logger, receiverClosed chan error)

Send pairs outgoing messages, with proper stream. It shoud run in separate goroutine than TaskRPC

Types

type IndexerServer

type IndexerServer struct {
	indexer.UnimplementedIndexerServiceServer
	// contains filtered or unexported fields
}

IndexerServer is implemantation of GRPC IndexerServiceServer

func NewIndexerServer

func NewIndexerServer(ctx context.Context, client cStructs.IndexerClienter, logger *zap.Logger) *IndexerServer

NewIndexerServer if IndexerServer constructor

func (*IndexerServer) TaskRPC

func (is *IndexerServer) TaskRPC(taskStream indexer.IndexerService_TaskRPCServer) error

TaskRPC is fullfilment of TaskRPC endpoint from grpc. it receives new stream requests and creates the second stream, afterwards just controls incoming messages

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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