Documentation
¶
Index ¶
- type Daprd
- func (d *Daprd) ActorInvokeURL(actorType, actorID, method string) string
- func (d *Daprd) ActorReminderURL(actorType, actorID, method string) string
- func (d *Daprd) AppAddress(t *testing.T) string
- func (d *Daprd) AppID() string
- func (d *Daprd) AppPort(t *testing.T) int
- func (d *Daprd) Cleanup(t *testing.T)
- func (d *Daprd) GRPCAddress() string
- func (d *Daprd) GRPCClient(t *testing.T, ctx context.Context) rtv1.DaprClient
- func (d *Daprd) GRPCConn(t *testing.T, ctx context.Context) *grpc.ClientConn
- func (d *Daprd) GRPCPort() int
- func (d *Daprd) GetMetaActorRuntime(t assert.TestingT, ctx context.Context) *MetadataActorRuntime
- func (d *Daprd) GetMetaHTTPEndpoints(t assert.TestingT, ctx context.Context) []*rtv1.MetadataHTTPEndpoint
- func (d *Daprd) GetMetaRegisteredComponents(t assert.TestingT, ctx context.Context) []*rtv1.RegisteredComponents
- func (d *Daprd) GetMetaScheduler(t assert.TestingT, ctx context.Context) *rtv1.MetadataScheduler
- func (d *Daprd) GetMetaSubscriptions(t assert.TestingT, ctx context.Context) []MetadataResponsePubsubSubscription
- func (d *Daprd) GetMetaSubscriptionsWithType(t assert.TestingT, ctx context.Context, subType string) []MetadataResponsePubsubSubscription
- func (d *Daprd) GetMetadata(t assert.TestingT, ctx context.Context) *Metadata
- func (d *Daprd) HTTPAddress() string
- func (d *Daprd) HTTPDelete2xx(t assert.TestingT, ctx context.Context, path string, body io.Reader, ...)
- func (d *Daprd) HTTPGet(t assert.TestingT, ctx context.Context, path string, expectedCode int)
- func (d *Daprd) HTTPGet2xx(t assert.TestingT, ctx context.Context, path string)
- func (d *Daprd) HTTPPort() int
- func (d *Daprd) HTTPPost(t assert.TestingT, ctx context.Context, path string, body io.Reader, ...)
- func (d *Daprd) HTTPPost2xx(t assert.TestingT, ctx context.Context, path string, body io.Reader, ...)
- func (d *Daprd) InternalGRPCAddress() string
- func (d *Daprd) InternalGRPCPort() int
- func (d *Daprd) Kill(t *testing.T)
- func (d *Daprd) MetricResidentMemoryMi(t *testing.T, ctx context.Context) float64
- func (d *Daprd) Metrics(t assert.TestingT, ctx context.Context) *metrics.Metrics
- func (d *Daprd) MetricsAddress() string
- func (d *Daprd) MetricsPort() int
- func (d *Daprd) Namespace() string
- func (d *Daprd) ProfilePort() int
- func (d *Daprd) PublicPort() int
- func (d *Daprd) ReplaceArg(t *testing.T, flag, value string)
- func (d *Daprd) Restart(t *testing.T, ctx context.Context)
- func (d *Daprd) Run(t *testing.T, ctx context.Context)
- func (d *Daprd) WaitUntilAppHealth(t *testing.T, ctx context.Context)
- func (d *Daprd) WaitUntilExit(t *testing.T, timeout time.Duration)
- func (d *Daprd) WaitUntilRunning(t *testing.T, ctx context.Context)
- func (d *Daprd) WaitUntilTCPReady(t *testing.T, ctx context.Context)
- type Metadata
- type MetadataActorRuntime
- type MetadataActorRuntimeActiveActor
- type MetadataResponsePubsubSubscription
- type MetadataResponsePubsubSubscriptionRule
- type MetadataWorkflows
- type Option
- func WithAllowedOrigins(t *testing.T, origins string) Option
- func WithAppAPIToken(t *testing.T, token string) Option
- func WithAppHealthCheck(enabled bool) Option
- func WithAppHealthCheckPath(path string) Option
- func WithAppHealthProbeInterval(interval int) Option
- func WithAppHealthProbeThreshold(threshold int) Option
- func WithAppID(appID string) Option
- func WithAppPort(port int) Option
- func WithAppProtocol(protocol string) Option
- func WithConfigManifests(t *testing.T, manifests ...string) Option
- func WithConfigs(configs ...string) Option
- func WithControlPlaneAddress(address string) Option
- func WithControlPlaneTrustDomain(trustDomain string) Option
- func WithDaprAPIToken(t *testing.T, token string) Option
- func WithDaprBlockShutdownDuration(duration string) Option
- func WithDaprGracefulShutdownSeconds(seconds int) Option
- func WithDisableInitEndpoints(endpoints ...string) Option
- func WithDisableK8sSecretStore(disable bool) Option
- func WithEnableMTLS(enable bool) Option
- func WithErrorCodeMetrics(t *testing.T) Option
- func WithExecOptions(execOptions ...exec.Option) Option
- func WithExit1() Option
- func WithGRPCPort(port int) Option
- func WithHTTPPort(port int) Option
- func WithInMemoryActorStateStore(storeName string) Option
- func WithInMemoryStateStore(storeName string) Option
- func WithInternalGRPCPort(port int) Option
- func WithLogLevel(logLevel string) Option
- func WithLogLineStdout(ll *logline.LogLine) Option
- func WithMaxBodySize(size string) Option
- func WithMetricsPort(port int) Option
- func WithMode(mode string) Option
- func WithNamespace(namespace string) Option
- func WithPlacement(placement *placement.Placement) Option
- func WithPlacementAddresses(addresses ...string) Option
- func WithProfilePort(port int) Option
- func WithPublicPort(port int) Option
- func WithResourceFiles(files ...string) Option
- func WithResourcesDir(dirs ...string) Option
- func WithScheduler(scheduler *scheduler.Scheduler) Option
- func WithSchedulerAddresses(addresses ...string) Option
- func WithSchedulerAddressesReset(addresses ...string) Option
- func WithSentry(t *testing.T, sentry *sentry.Sentry) Option
- func WithSentryAddress(address string) Option
- func WithSkipStateStoreReminderMigration(t *testing.T) Option
- func WithSocket(t *testing.T, socket *socket.Socket) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daprd ¶
type Daprd struct {
// contains filtered or unexported fields
}
func (*Daprd) ActorInvokeURL ¶ added in v1.15.0
func (*Daprd) ActorReminderURL ¶ added in v1.15.0
func (*Daprd) GRPCAddress ¶ added in v1.13.0
func (*Daprd) GRPCClient ¶ added in v1.13.0
func (*Daprd) GetMetaActorRuntime ¶ added in v1.15.2
func (*Daprd) GetMetaHTTPEndpoints ¶ added in v1.13.6
func (*Daprd) GetMetaRegisteredComponents ¶ added in v1.13.6
func (*Daprd) GetMetaScheduler ¶ added in v1.15.0
func (*Daprd) GetMetaSubscriptions ¶ added in v1.13.6
func (*Daprd) GetMetaSubscriptionsWithType ¶ added in v1.14.0
func (*Daprd) GetMetadata ¶ added in v1.16.0
func (*Daprd) HTTPAddress ¶ added in v1.13.0
func (*Daprd) HTTPDelete2xx ¶ added in v1.14.5
func (*Daprd) HTTPGet2xx ¶ added in v1.13.3
func (*Daprd) HTTPPost2xx ¶ added in v1.13.3
func (*Daprd) InternalGRPCAddress ¶ added in v1.13.0
func (*Daprd) InternalGRPCPort ¶
func (*Daprd) MetricResidentMemoryMi ¶ added in v1.14.5
func (*Daprd) Metrics ¶ added in v1.13.2
Metrics Returns a subset of metrics scraped from the metrics endpoint
func (*Daprd) MetricsAddress ¶ added in v1.13.2
func (*Daprd) MetricsPort ¶
func (*Daprd) ProfilePort ¶
func (*Daprd) PublicPort ¶
func (*Daprd) ReplaceArg ¶ added in v1.17.7
ReplaceArg sets `--<flag>=<value>` on the daprd command line for the next Run/Restart, replacing any existing occurrence of that flag. Existing args remain in place, so this is safe to call between Kill and Restart.
func (*Daprd) WaitUntilAppHealth ¶
func (*Daprd) WaitUntilExit ¶ added in v1.17.7
WaitUntilExit waits for daprd to exit on its own (e.g. via the shutdown API) and asserts the expected exit code via the framework. The HTTP port is polled; once dialing fails, the process has exited. Unlike Cleanup, no signal is sent to the process, which avoids racing with self-exit paths where signaling an already-reaped PID would fail.
func (*Daprd) WaitUntilRunning ¶
type Metadata ¶ added in v1.16.0
type Metadata struct {
RegisteredComponents []*rtv1.RegisteredComponents `json:"components,omitempty"`
Subscriptions []MetadataResponsePubsubSubscription `json:"subscriptions,omitempty"`
HTTPEndpoints []*rtv1.MetadataHTTPEndpoint `json:"httpEndpoints,omitempty"`
Scheduler *rtv1.MetadataScheduler `json:"scheduler,omitempty"`
ActorRuntime *MetadataActorRuntime `json:"actorRuntime,omitempty"`
Workflows *MetadataWorkflows `json:"workflows"`
}
Metadata is a subset of metadataResponse defined in pkg/api/http/metadata.go:160
type MetadataActorRuntime ¶ added in v1.15.2
type MetadataActorRuntime struct {
RuntimeStatus string `json:"runtimeStatus"`
HostReady bool `json:"hostReady"`
Placement string `json:"placement"`
ActiveActors []*MetadataActorRuntimeActiveActor `json:"activeActors"`
}
type MetadataActorRuntimeActiveActor ¶ added in v1.15.2
type MetadataResponsePubsubSubscription ¶ added in v1.13.6
type MetadataResponsePubsubSubscription struct {
PubsubName string `json:"pubsubname"`
Topic string `json:"topic"`
Metadata map[string]string `json:"metadata,omitempty"`
Rules []MetadataResponsePubsubSubscriptionRule `json:"rules,omitempty"`
DeadLetterTopic string `json:"deadLetterTopic"`
Type string `json:"type"`
}
MetadataResponsePubsubSubscription copied from pkg/api/http/metadata.go:172 to be able to use in integration tests until we move to Proto format
type MetadataResponsePubsubSubscriptionRule ¶ added in v1.13.6
type MetadataWorkflows ¶ added in v1.16.0
type MetadataWorkflows struct {
ConnectedWorkers int `json:"connectedWorkers,omitempty"`
}
type Option ¶
type Option func(*options)
Option is a function that configures the dapr process.
func WithAllowedOrigins ¶ added in v1.16.0
func WithAppHealthCheck ¶
func WithAppHealthCheckPath ¶
func WithAppPort ¶
func WithAppProtocol ¶
func WithConfigManifests ¶ added in v1.13.3
func WithConfigs ¶
func WithControlPlaneAddress ¶
func WithControlPlaneTrustDomain ¶ added in v1.13.2
func WithDaprBlockShutdownDuration ¶ added in v1.13.0
func WithDaprGracefulShutdownSeconds ¶ added in v1.13.0
func WithDisableInitEndpoints ¶ added in v1.17.0
func WithEnableMTLS ¶
func WithErrorCodeMetrics ¶ added in v1.15.0
func WithExecOptions ¶
func WithGRPCPort ¶
func WithHTTPPort ¶
func WithInMemoryActorStateStore ¶ added in v1.13.0
WithInMemoryActorStateStore adds an in-memory state store component, which is also enabled as actor state store.
func WithInMemoryStateStore ¶ added in v1.13.3
func WithInternalGRPCPort ¶
func WithLogLevel ¶
func WithLogLineStdout ¶ added in v1.13.0
func WithMaxBodySize ¶ added in v1.15.1
func WithMetricsPort ¶
func WithNamespace ¶ added in v1.13.0
func WithPlacement ¶ added in v1.17.0
func WithPlacementAddresses ¶
func WithProfilePort ¶
func WithPublicPort ¶
func WithResourceFiles ¶
func WithResourcesDir ¶ added in v1.13.0
func WithScheduler ¶ added in v1.14.2
func WithSchedulerAddresses ¶ added in v1.14.0
func WithSchedulerAddressesReset ¶ added in v1.17.7
WithSchedulerAddressesReset replaces any previously configured scheduler addresses with the supplied set. Use this when a later option layer needs to redirect daprd away from a scheduler address an earlier layer already added (for example pointing daprd at a scheduler proxy instead of the real scheduler).