grpc

package
v0.5.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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, pubSub pubsub.PubSub, directMessaging messaging.DirectMessaging, actor actors.Actors, sendToOutputBindingFn func(name string, req *bindings.WriteRequest) error, componentHandler components.ComponentHandler) 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() *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 NewServer

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

NewServer returns a new gRPC server

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