grpc

package
v0.7.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDialAddressPrefix added in v0.7.0

func GetDialAddressPrefix(mode modes.DaprMode) string

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

func GetFreePort added in v0.6.0

func GetFreePort() (int, error)

GetFreePort returns a free port from the OS

Types

type API

API is the gRPC interface for the Dapr gRPC API. It implements both the internal and external proto definitions.

func NewAPI

func NewAPI(
	appID string, appChannel channel.AppChannel,
	stateStores map[string]state.Store,
	secretStores map[string]secretstores.SecretStore,
	publishFn func(req *pubsub.PublishRequest) error,
	directMessaging messaging.DirectMessaging,
	actor actors.Actors,
	sendToOutputBindingFn func(name string, req *bindings.WriteRequest) error,
	tracingSpec config.TracingSpec) API

NewAPI returns a new gRPC API

type Manager

type Manager struct {
	AppClient *grpc.ClientConn
	// contains filtered or unexported fields
}

Manager is a wrapper around gRPC connection pooling

func NewGRPCManager

func NewGRPCManager(mode modes.DaprMode) *Manager

NewGRPCManager returns a new grpc manager

func (*Manager) CreateLocalChannel

func (g *Manager) CreateLocalChannel(port, maxConcurrency int, spec config.TracingSpec) (channel.AppChannel, error)

CreateLocalChannel creates a new gRPC AppChannel

func (*Manager) GetGRPCConnection

func (g *Manager) GetGRPCConnection(address, id string, skipTLS, recreateIfExists bool) (*grpc.ClientConn, error)

GetGRPCConnection returns a new grpc connection for a given address and inits one if doesn't exist

func (*Manager) SetAuthenticator added in v0.4.0

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

SetAuthenticator sets the gRPC manager a tls authenticator context

type Server

type Server interface {
	StartNonBlocking() error
}

Server is an interface for the dapr gRPC server

func NewAPIServer added in v0.6.0

func NewAPIServer(api API, config ServerConfig, tracingSpec config.TracingSpec) Server

NewAPIServer returns a new user facing gRPC API server

func NewInternalServer added in v0.6.0

func NewInternalServer(api API, config ServerConfig, tracingSpec config.TracingSpec, authenticator auth.Authenticator) Server

NewInternalServer returns a new gRPC server for Dapr to Dapr communications

type ServerConfig

type ServerConfig struct {
	AppID       string
	HostAddress string
	Port        int
}

ServerConfig is the config object for a grpc server

func NewServerConfig

func NewServerConfig(appID string, hostAddress string, port int) ServerConfig

NewServerConfig returns a new grpc server config

Jump to

Keyboard shortcuts

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