grpc

package
v1.12.5 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 56 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 added in v1.10.0

type APIOpts struct {
	UniversalAPI          *universalapi.UniversalAPI
	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 added in v0.6.0

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 added in v0.6.0

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
Package universalapi contains the implementation of APIs that are shared between gRPC and HTTP servers.
Package universalapi contains the implementation of APIs that are shared between gRPC and HTTP servers.

Jump to

Keyboard shortcuts

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