grpc

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	io.Closer

	// DaprInternal Service methods
	internalv1pb.ServiceInvocationServer

	// Dapr Service methods
	runtimev1pb.DaprServer

	// Methods internal to the object
	SetActorRuntime(actor actors.ActorRuntime)
}

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

func NewAPI

func NewAPI(opts APIOpts) API

NewAPI returns a new gRPC API.

type APIOpts

type APIOpts struct {
	Universal             *universal.Universal
	Logger                logger.Logger
	Channels              *channels.Channels
	PubsubAdapter         runtimePubsub.Adapter
	DirectMessaging       invokev1.DirectMessaging
	SendToOutputBindingFn func(ctx context.Context, name string, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
	TracingSpec           config.TracingSpec
	AccessControlList     *config.AccessControlList
}

APIOpts contains options for NewAPI.

type Server

type Server interface {
	io.Closer
	StartNonBlocking() error
}

Server is an interface for the dapr gRPC server.

func NewAPIServer

func NewAPIServer(api API, config ServerConfig, tracingSpec config.TracingSpec, metricSpec config.MetricSpec, apiSpec config.APISpec, proxy messaging.Proxy, workflowEngine *wfengine.WorkflowEngine) Server

NewAPIServer returns a new user facing gRPC API server.

func NewInternalServer

func NewInternalServer(api API, config ServerConfig, tracingSpec config.TracingSpec, metricSpec config.MetricSpec, sec security.Handler, proxy messaging.Proxy) Server

NewInternalServer returns a new gRPC server for Dapr to Dapr communications.

type ServerConfig

type ServerConfig struct {
	AppID                string
	HostAddress          string
	Port                 int
	APIListenAddresses   []string
	NameSpace            string
	TrustDomain          string
	MaxRequestBodySizeMB int
	UnixDomainSocket     string
	ReadBufferSizeKB     int
	EnableAPILogging     bool
}

ServerConfig is the config object for a grpc server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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