runtime

package
v1.13.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 70 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 MB for Dapr HTTP servers.
	DefaultMaxRequestBodySize = 4
	// 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 KB for Dapr HTTP servers.
	DefaultReadBufferSize = 4
	// 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
	DaprHTTPMaxRequestSize       int
	ResourcesPath                []string
	ComponentsPath               string
	AppProtocol                  string
	EnableAPILogging             *bool
	DaprHTTPPort                 string
	DaprAPIGRPCPort              string
	ProfilePort                  string
	DaprInternalGRPCPort         string
	DaprPublicPort               string
	ApplicationPort              string
	DaprGracefulShutdownSeconds  int
	DaprBlockShutdownDuration    *time.Duration
	ActorsService                string
	RemindersService             string
	DaprAPIListenAddresses       string
	AppHealthProbeInterval       int
	AppHealthProbeTimeout        int
	AppHealthThreshold           int
	EnableAppHealthCheck         bool
	Mode                         string
	Config                       []string
	UnixDomainSocket             string
	DaprHTTPReadBufferSize       int
	DisableBuiltinK8sSecretStore bool
	AppHealthCheckPath           string
	AppChannelAddress            string
	Metrics                      *metrics.Options
	Registry                     *registry.Options
	Security                     security.Handler
}

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