Documentation
¶
Index ¶
- Constants
- func NewService(address string) common.Service
- func NewServiceWithMux(address string, mux *mux.Router) common.Service
- type Server
- func (s *Server) AddBindingInvocationHandler(route string, ...) error
- func (s *Server) AddServiceInvocationHandler(route string, ...) error
- func (s *Server) AddTopicEventHandler(sub *common.Subscription, ...) error
- func (s *Server) RegisterActorImplFactory(f actor.Factory, opts ...config.Option)
- func (s *Server) Start() error
- func (s *Server) Stop() error
Constants ¶
View Source
const ( // PubSubHandlerSuccessStatusCode is the successful ack code for pubsub event appcallback response. PubSubHandlerSuccessStatusCode int = http.StatusOK // PubSubHandlerRetryStatusCode is the error response code (nack) pubsub event appcallback response. PubSubHandlerRetryStatusCode int = http.StatusInternalServerError // PubSubHandlerDropStatusCode is the pubsub event appcallback response code indicating that Dapr should drop that message. PubSubHandlerDropStatusCode int = http.StatusSeeOther )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the HTTP server wrapping mux many Dapr helpers.
func (*Server) AddBindingInvocationHandler ¶
func (s *Server) AddBindingInvocationHandler(route string, fn func(ctx context.Context, in *common.BindingEvent) (out []byte, err error)) error
AddBindingInvocationHandler appends provided binding invocation handler with its route to the service.
func (*Server) AddServiceInvocationHandler ¶
func (s *Server) AddServiceInvocationHandler(route string, fn func(ctx context.Context, in *common.InvocationEvent) (out *common.Content, err error)) error
AddServiceInvocationHandler appends provided service invocation handler with its route to the service.
func (*Server) AddTopicEventHandler ¶
func (s *Server) AddTopicEventHandler(sub *common.Subscription, fn func(ctx context.Context, e *common.TopicEvent) (retry bool, err error)) error
AddTopicEventHandler appends provided event handler with it's name to the service.
func (*Server) RegisterActorImplFactory ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.