Help us shape the future of Go! Take the 2026 Go Developer Survey

grpc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGRPCChannel

func CreateGRPCChannel(host string, port int, conn *grpc.ClientConn) (channel.AppChannel, error)

CreateGRPCChannel currently unused

func GetDialAddressPrefix

func GetDialAddressPrefix(mode modes.DaprMode) string

GetDialAddressPrefix returns a dial prefix for a gRPC client connections For a given DaprMode.

Types

type Channel

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

Channel is a concrete AppChannel implementation for interacting with gRPC based user code.

func CreateLocalChannel

func CreateLocalChannel(host string, port int, conn *grpc.ClientConn) *Channel

CreateLocalChannel creates a gRPC connection with user code.

func (*Channel) GetAppConfig

func (g *Channel) GetAppConfig() (*config.ApplicationConfig, error)

GetAppConfig gets application config from user application.

func (*Channel) GetBaseAddress

func (g *Channel) GetBaseAddress() string

GetBaseAddress returns the application base address.

func (*Channel) InvokeMethod

InvokeMethod invokes user code via gRPC.

type ClientConnCloser

type ClientConnCloser interface {
	grpc.ClientConnInterface
	io.Closer
}

ClientConnCloser combines grpc.ClientConnInterface and io.Closer to cover the methods used from *grpc.ClientConn.

type Manager

type Manager struct {
	AppClient ClientConnCloser
	// contains filtered or unexported fields
}

Manager is a wrapper around gRPC connection pooling.

func NewGRPCManager

func NewGRPCManager(host string, port int, sslEnabled bool) *Manager

func (*Manager) GetGRPCConnection

func (g *Manager) GetGRPCConnection() (*grpc.ClientConn, func(), error)

func (*Manager) SetAuthenticator

func (g *Manager) SetAuthenticator(auth security.Authenticator)

SetAuthenticator sets the gRPC manager a tls authenticator context.

func (*Manager) StartEndpointsDetection

func (g *Manager) StartEndpointsDetection()

StartEndpointsDetection update function endpoints

Jump to

Keyboard shortcuts

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