Documentation ¶
Index ¶
- Constants
- func NewService(address string) common.Service
- func NewServiceWithMux(address string, mux *chi.Mux) common.Service
- type Server
- func (s *Server) AddBindingInvocationHandler(route string, fn common.BindingInvocationHandler) error
- func (s *Server) AddHealthCheckHandler(route string, fn common.HealthCheckHandler) error
- func (s *Server) AddServiceInvocationHandler(route string, fn common.ServiceInvocationHandler) error
- func (s *Server) AddTopicEventHandler(sub *common.Subscription, fn common.TopicEventHandler) error
- func (s *Server) GracefulStop() error
- func (s *Server) RegisterActorImplFactory(f actor.Factory, opts ...config.Option)deprecated
- func (s *Server) RegisterActorImplFactoryContext(f actor.FactoryContext, 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 ¶
func NewServiceWithMux ¶
NewServiceWithMux creates new Service with existing http mux.
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 common.BindingInvocationHandler) error
AddBindingInvocationHandler appends provided binding invocation handler with its route to the service.
func (*Server) AddHealthCheckHandler ¶
func (s *Server) AddHealthCheckHandler(route string, fn common.HealthCheckHandler) error
AddHealthCheckHandler appends provided app health check handler.
func (*Server) AddServiceInvocationHandler ¶
func (s *Server) AddServiceInvocationHandler(route string, fn common.ServiceInvocationHandler) error
AddServiceInvocationHandler appends provided service invocation handler with its route to the service.
func (*Server) AddTopicEventHandler ¶
func (s *Server) AddTopicEventHandler(sub *common.Subscription, fn common.TopicEventHandler) error
AddTopicEventHandler appends provided event handler with it's name to the service.
func (*Server) GracefulStop ¶
func (*Server) RegisterActorImplFactoryContext ¶
func (s *Server) RegisterActorImplFactoryContext(f actor.FactoryContext, opts ...config.Option)
Click to show internal directories.
Click to hide internal directories.