runtime

package
v1.14.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 81 Imported by: 12

Documentation

Index

Constants

View Source
const (
	// DefaultDaprHTTPPort is the default http port for Dapr.
	DefaultDaprHTTPPort = 3500
	// DefaultDaprPublicPort is the default http port for Dapr.
	DefaultDaprPublicPort = 3501
	// DefaultDaprAPIGRPCPort is the default API gRPC port for Dapr.
	DefaultDaprAPIGRPCPort = 50001
	// DefaultProfilePort is the default port for profiling endpoints.
	DefaultProfilePort = 7777
	// DefaultMetricsPort is the default port for metrics endpoints.
	DefaultMetricsPort = 9090
	// DefaultMaxRequestBodySize is the default option for the maximum body size in bytes for Dapr HTTP servers.
	// Equal to 4MB
	DefaultMaxRequestBodySize = 4 << 20
	// DefaultAPIListenAddress is which address to listen for the Dapr HTTP and GRPC APIs. Empty string is all addresses.
	DefaultAPIListenAddress = ""
	// DefaultReadBufferSize is the default option for the maximum header size in bytes for Dapr HTTP servers.
	// Equal to 4KB
	DefaultReadBufferSize = 4 << 10
	// DefaultGracefulShutdownDuration is the default option for the duration of the graceful shutdown.
	DefaultGracefulShutdownDuration = time.Second * 5
	// DefaultAppHealthCheckPath is the default path for HTTP health checks.
	DefaultAppHealthCheckPath = "/healthz"
	// DefaultChannelAddress is the default local network address that user application listen on.
	DefaultChannelAddress = "127.0.0.1"
)

Variables

This section is empty.

Functions

func WaitUntilDaprOutboundReady added in v1.12.0

func WaitUntilDaprOutboundReady(daprHTTPPort string)

Types

type Config

type Config struct {
	AppID                         string
	ControlPlaneAddress           string
	SentryAddress                 string
	AllowedOrigins                string
	EnableProfiling               bool
	AppMaxConcurrency             int
	EnableMTLS                    bool
	AppSSL                        bool
	MaxRequestSize                int // In bytes
	ResourcesPath                 []string
	ComponentsPath                string
	AppProtocol                   string
	EnableAPILogging              *bool
	DaprHTTPPort                  string
	DaprAPIGRPCPort               string
	ProfilePort                   string
	DaprInternalGRPCPort          string
	DaprInternalGRPCListenAddress string
	DaprPublicPort                string
	DaprPublicListenAddress       string
	ApplicationPort               string
	DaprGracefulShutdownSeconds   int
	DaprBlockShutdownDuration     *time.Duration
	ActorsService                 string
	RemindersService              string
	SchedulerAddress              []string
	DaprAPIListenAddresses        string
	AppHealthProbeInterval        int
	AppHealthProbeTimeout         int
	AppHealthThreshold            int
	EnableAppHealthCheck          bool
	Mode                          string
	Config                        []string
	UnixDomainSocket              string
	ReadBufferSize                int // In bytes
	DisableBuiltinK8sSecretStore  bool
	AppHealthCheckPath            string
	AppChannelAddress             string
	Metrics                       metrics.Options
	Registry                      *registry.Options
	Security                      security.Handler
	Healthz                       healthz.Healthz
}

Config holds the Dapr Runtime configuration.

type DaprRuntime

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

DaprRuntime holds all the core components of the runtime.

func FromConfig added in v1.12.0

func FromConfig(ctx context.Context, cfg *Config) (*DaprRuntime, error)

FromConfig creates a new Dapr Runtime from a configuration.

func (*DaprRuntime) Run

func (a *DaprRuntime) Run(parentCtx context.Context) error

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

func (*DaprRuntime) ShutdownWithWait added in v1.1.0

func (a *DaprRuntime) ShutdownWithWait()

ShutdownWithWait will gracefully stop runtime and wait outstanding operations.

func (*DaprRuntime) WaitUntilShutdown added in v1.5.0

func (a *DaprRuntime) WaitUntilShutdown()

Jump to

Keyboard shortcuts

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