grpc

package
v1.14.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 66 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
	PubSubAdapterStreamer runtimePubsub.AdapterStreamer
	Outbox                outbox.Outbox
	DirectMessaging       invokev1.DirectMessaging
	SendToOutputBindingFn func(ctx context.Context, name string, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
	TracingSpec           config.TracingSpec
	AccessControlList     *config.AccessControlList
	Processor             *processor.Processor
}

APIOpts contains options for NewAPI.

type Options added in v1.14.0

type Options struct {
	API            API
	Config         ServerConfig
	TracingSpec    config.TracingSpec
	MetricSpec     config.MetricSpec
	APISpec        config.APISpec
	Proxy          messaging.Proxy
	WorkflowEngine *wfengine.WorkflowEngine
	Healthz        healthz.Healthz
}

type OptionsInternal added in v1.14.0

type OptionsInternal struct {
	API         API
	Config      ServerConfig
	TracingSpec config.TracingSpec
	MetricSpec  config.MetricSpec
	Security    security.Handler
	Proxy       messaging.Proxy
	Healthz     healthz.Healthz
}

type Server

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

Server is an interface for the dapr gRPC server.

func NewAPIServer

func NewAPIServer(opts Options) Server

NewAPIServer returns a new user facing gRPC API server.

func NewInternalServer

func NewInternalServer(opts OptionsInternal) 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
	MaxRequestBodySize int // In bytes
	ReadBufferSize     int // In bytes
	UnixDomainSocket   string
	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