runtime

package
v1.12.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 73 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 ComponentAuthorizer added in v1.9.0

type ComponentAuthorizer func(component componentsV1alpha1.Component) bool

Type of function that determines if a component is authorized. The function receives the component and must return true if the component is authorized.

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
	PlacementServiceHostAddr     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(ctx 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()

type HTTPEndpointAuthorizer added in v1.11.0

type HTTPEndpointAuthorizer func(endpoint httpEndpointV1alpha1.HTTPEndpoint) bool

Type of function that determines if an http endpoint is authorized. The function receives the http endpoint and must return true if the http endpoint is authorized.

Jump to

Keyboard shortcuts

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