servicers

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const TestSyncRPCAgHwId = "Test-AGW-Hw-Id"

Variables

This section is empty.

Functions

func NewSyncRPCService

func NewSyncRPCService(hostName string, broker broker.GatewayRPCBroker) (protos.SyncRPCServiceServer, error)

func NewTestSyncRPCServer

func NewTestSyncRPCServer(hostName string, broker broker.GatewayRPCBroker) (*testSyncRPCServer, error)

func RecvWithContext

func RecvWithContext(ctx context.Context, f func() (*protos.SyncRPCResponse, error)) (*protos.SyncRPCResponse, error)

RecvWithContext runs f and returns its error. If the context is cancelled or times out first, it returns the context's error instead. See https://github.com/grpc/grpc-go/issues/1229#issuecomment-300938770

Types

type SyncRPCService

type SyncRPCService struct {
	// contains filtered or unexported fields
}

func (*SyncRPCService) EstablishSyncRPCStream

func (srv *SyncRPCService) EstablishSyncRPCStream(stream protos.SyncRPCService_EstablishSyncRPCStreamServer) error

EstablishSyncRPCStream is the RPC call that will be called by gateways. It establishes a bidirectional stream between the gateway and the cloud, and the streams will close if it returns.

Every active connection will run this function in its own goroutine.

func (*SyncRPCService) SyncRPC deprecated

SyncRPC exists for backwards compatibility.

Deprecated: Use EstablishSyncRPCStream instead.

type WrappedSyncResponse

type WrappedSyncResponse struct {
	Resp *protos.SyncRPCResponse
	Err  error
}

Jump to

Keyboard shortcuts

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