grpc

package
v0.7.3-rc0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: AGPL-3.0 Imports: 11 Imported by: 2

Documentation

Overview

Package grpc provides grpc utilities.

Index

Constants

This section is empty.

Variables

View Source
var DefaultWebRTCConfiguration = webrtc.Configuration{
	ICEServers: []webrtc.ICEServer{
		{
			URLs: []string{"stun:global.stun.twilio.com:3478"},
		},
	},
}

DefaultWebRTCConfiguration is the default configuration to use.

View Source
var UnimplementedError = status.Error(codes.Unimplemented, codes.Unimplemented.String())

UnimplementedError is returned any time a gRPC method is unimplemented.

Functions

func Dial

func Dial(ctx context.Context, address string, logger golog.Logger, opts ...rpc.DialOption) (rpc.ClientConn, error)

Dial dials a gRPC server.

func InferSignalingServerAddress

func InferSignalingServerAddress(address string) (string, bool, bool)

InferSignalingServerAddress returns the appropriate WebRTC signaling server address if it can be detected. Returns the address, if the endpoint is secure, and if found. TODO(RSDK-235): remove hard coding of signaling server address and prefer SRV lookup instead.

Types

type ForeignResource

type ForeignResource struct {
	resource.Named
	resource.TriviallyCloseable
	// contains filtered or unexported fields
}

An ForeignResource is used to dynamically invoke RPC calls to resources that have their RPC information dervied on demand.

func NewForeignResource

func NewForeignResource(name resource.Name, conn rpc.ClientConn) *ForeignResource

NewForeignResource returns an ForeignResource for the given resource name and connection serving it.

func (*ForeignResource) NewStub

func (res *ForeignResource) NewStub() grpcdynamic.Stub

NewStub returns a new gRPC client stub used to communicate with the resource.

func (*ForeignResource) Reconfigure added in v0.2.36

func (res *ForeignResource) Reconfigure(ctx context.Context, deps resource.Dependencies, conf resource.Config) error

Reconfigure always fails.

Jump to

Keyboard shortcuts

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