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
Click to show internal directories.
Click to hide internal directories.