runtime

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 38 Imported by: 12 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// GRPCProtocol is a gRPC communication protocol
	GRPCProtocol Protocol = "grpc"
	// HTTPProtocol is a HTTP communication protocol
	HTTPProtocol Protocol = "http"
	// DefaultDaprHTTPPort is the default http port for Dapr
	DefaultDaprHTTPPort = 3500
	// DefaultDaprGRPCPort is the default gRPC port for Dapr
	DefaultDaprGRPCPort = 50001
	// DefaultProfilePort is the default port for profiling endpoints
	DefaultProfilePort = 7777
	// DefaultComponentsPath is the default dir for Dapr components (standalone mode)
	DefaultComponentsPath = "./components"
	// DefaultAllowedOrigins is the default origins allowed for the Dapr HTTP servers
	DefaultAllowedOrigins = "*"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID                      string
	HTTPPort                int
	ProfilePort             int
	EnableProfiling         bool
	GRPCPort                int
	ApplicationPort         int
	ApplicationProtocol     Protocol
	Mode                    modes.DaprMode
	PlacementServiceAddress string
	GlobalConfig            string
	AllowedOrigins          string
	Standalone              config.StandaloneConfig
	Kubernetes              config.KubernetesConfig
	MaxConcurrency          int
}

Config holds the Dapr Runtime configuration

func NewRuntimeConfig

func NewRuntimeConfig(id, placementServiceAddress, controlPlaneAddress, allowedOrigins, globalConfig, componentsPath, appProtocol, mode string, httpPort, grpcPort, appPort, profilePort int, enableProfiling bool, maxConcurrency int) *Config

NewRuntimeConfig returns a new runtime config

type DaprRuntime

type DaprRuntime struct {
	// contains filtered or unexported fields
}

DaprRuntime holds all the core components of the runtime

func NewDaprRuntime

func NewDaprRuntime(runtimeConfig *Config, globalConfig *config.Configuration) *DaprRuntime

NewDaprRuntime returns a new runtime with the given runtime config and global config

func (*DaprRuntime) OnComponentUpdated

func (a *DaprRuntime) OnComponentUpdated(component components_v1alpha1.Component)

OnComponentUpdated updates the Dapr runtime with new or changed components This method is invoked from the Dapr Control Plane whenever a component update happens

func (*DaprRuntime) Run

func (a *DaprRuntime) Run() error

Run performs initialization of the runtime with the runtime and global configurations

func (*DaprRuntime) Stop

func (a *DaprRuntime) Stop()

Stop allows for a graceful shutdown of all runtime internal operations or components

type Protocol

type Protocol string

Protocol is a communications protocol

Jump to

Keyboard shortcuts

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