Documentation ¶
Index ¶
- Constants
- func NewCloudEvent(req *CloudEvent) (map[string]interface{}, error)
- type Adapter
- type CloudEvent
- type Expr
- type NotAllowedError
- type NotFoundError
- type RoutesJSON
- type Rule
- type RuleJSON
- type Subscription
- func DeclarativeKubernetes(client operatorv1pb.OperatorClient, podName string, namespace string, ...) []Subscription
- func DeclarativeSelfHosted(componentsPath string, log logger.Logger) (subs []Subscription)
- func GetSubscriptionsGRPC(channel runtimev1pb.AppCallbackClient, log logger.Logger, ...) ([]Subscription, error)
- func GetSubscriptionsHTTP(channel channel.AppChannel, log logger.Logger, r resiliency.Provider, ...) ([]Subscription, error)
- type SubscriptionJSON
Constants ¶
View Source
const ( APIVersionV1alpha1 = "dapr.io/v1alpha1" APIVersionV2alpha1 = "dapr.io/v2alpha1" )
Variables ¶
This section is empty.
Functions ¶
func NewCloudEvent ¶ added in v1.0.0
func NewCloudEvent(req *CloudEvent) (map[string]interface{}, error)
NewCloudEvent encapsulates the creation of a Dapr cloudevent from an existing cloudevent or a raw payload.
Types ¶
type Adapter ¶ added in v1.0.0
type Adapter interface { GetPubSub(pubsubName string) contribPubsub.PubSub Publish(req *contribPubsub.PublishRequest) error }
Adapter is the interface for message buses.
type CloudEvent ¶ added in v1.0.0
type CloudEvent struct { ID string Data []byte Topic string Pubsub string DataContentType string TraceID string TraceState string }
CloudEvent is a request object to create a Dapr compliant cloudevent.
type NotAllowedError ¶ added in v1.0.0
pubsub.NotAllowedError is returned by the runtime when publishing is forbidden.
func (NotAllowedError) Error ¶ added in v1.0.0
func (e NotAllowedError) Error() string
type NotFoundError ¶ added in v1.0.0
type NotFoundError struct {
PubsubName string
}
pubsub.NotFoundError is returned by the runtime when the pubsub does not exist.
func (NotFoundError) Error ¶ added in v1.0.0
func (e NotFoundError) Error() string
type RoutesJSON ¶ added in v1.4.0
type Subscription ¶
type Subscription struct { PubsubName string `json:"pubsubname"` Topic string `json:"topic"` DeadLetterTopic string `json:"deadLetterTopic"` Metadata map[string]string `json:"metadata"` Rules []*Rule `json:"rules,omitempty"` Scopes []string `json:"scopes"` }
func DeclarativeKubernetes ¶ added in v0.11.0
func DeclarativeKubernetes(client operatorv1pb.OperatorClient, podName string, namespace string, log logger.Logger) []Subscription
DeclarativeKubernetes loads subscriptions from the operator when running in Kubernetes.
func DeclarativeSelfHosted ¶ added in v0.11.0
func DeclarativeSelfHosted(componentsPath string, log logger.Logger) (subs []Subscription)
DeclarativeSelfHosted loads subscriptions from the given components path.
func GetSubscriptionsGRPC ¶
func GetSubscriptionsGRPC(channel runtimev1pb.AppCallbackClient, log logger.Logger, r resiliency.Provider, resiliencyEnabled bool) ([]Subscription, error)
func GetSubscriptionsHTTP ¶
func GetSubscriptionsHTTP(channel channel.AppChannel, log logger.Logger, r resiliency.Provider, resiliencyEnabled bool) ([]Subscription, error)
type SubscriptionJSON ¶ added in v1.4.0
type SubscriptionJSON struct { PubsubName string `json:"pubsubname"` Topic string `json:"topic"` DeadLetterTopic string `json:"deadLetterTopic"` Metadata map[string]string `json:"metadata,omitempty"` Route string `json:"route"` // Single route from v1alpha1 Routes RoutesJSON `json:"routes"` // Multiple routes from v2alpha1 }
Click to show internal directories.
Click to hide internal directories.