Documentation
¶
Index ¶
- type FakeServer
- func (s *FakeServer) AddBindingInvocationHandler(name string, fn common.BindingInvocationHandler) error
- func (s *FakeServer) AddServiceInvocationHandler(method string, fn common.ServiceInvocationHandler) error
- func (s *FakeServer) AddTopicEventHandler(sub *common.Subscription, fn common.TopicEventHandler) error
- func (s *FakeServer) ListInputBindings(ctx context.Context, in *empty.Empty) (*pb.ListInputBindingsResponse, error)
- func (s *FakeServer) OnBindingEvent(ctx context.Context, in *pb.BindingEventRequest) (*pb.BindingEventResponse, error)
- func (s *FakeServer) OnInvoke(ctx context.Context, in *cpb.InvokeRequest) (*cpb.InvokeResponse, error)
- func (s *FakeServer) OnTopicEvent(ctx context.Context, in *pb.TopicEventRequest) (*pb.TopicEventResponse, error)
- func (s *FakeServer) RegisterActorImplFactory(f actor.Factory, opts ...config.Option)
- func (s *FakeServer) Start() error
- func (s *FakeServer) Stop() error
- type Runtime
- func (r *Runtime) GetHandler() interface{}
- func (r *Runtime) Name() ofctx.Runtime
- func (r *Runtime) RegisterCloudEventFunction(ctx context.Context, funcContext ofctx.RuntimeContext, ...) error
- func (r *Runtime) RegisterHTTPFunction(ctx ofctx.RuntimeContext, prePlugins []plugin.Plugin, ...) error
- func (r *Runtime) RegisterOpenFunction(ctx ofctx.RuntimeContext, prePlugins []plugin.Plugin, ...) error
- func (r *Runtime) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeServer ¶
type FakeServer struct { pb.UnimplementedAppCallbackServer // contains filtered or unexported fields }
FakeServer is the gRPC service implementation for Dapr.
func NewFakeService ¶
func NewFakeService(address string) (common.Service, *FakeServer, error)
NewFakeService creates new Service.
func (*FakeServer) AddBindingInvocationHandler ¶
func (s *FakeServer) AddBindingInvocationHandler(name string, fn common.BindingInvocationHandler) error
AddBindingInvocationHandler appends provided binding invocation handler with its name to the service.
func (*FakeServer) AddServiceInvocationHandler ¶
func (s *FakeServer) AddServiceInvocationHandler(method string, fn common.ServiceInvocationHandler) error
AddServiceInvocationHandler appends provided service invocation handler with its method to the service.
func (*FakeServer) AddTopicEventHandler ¶
func (s *FakeServer) AddTopicEventHandler(sub *common.Subscription, fn common.TopicEventHandler) error
AddTopicEventHandler appends provided event handler with topic name to the service.
func (*FakeServer) ListInputBindings ¶
func (s *FakeServer) ListInputBindings(ctx context.Context, in *empty.Empty) (*pb.ListInputBindingsResponse, error)
ListInputBindings is called by Dapr to get the list of bindings the app will get invoked by. In this example, we are telling Dapr To invoke our app with a binding named storage.
func (*FakeServer) OnBindingEvent ¶
func (s *FakeServer) OnBindingEvent(ctx context.Context, in *pb.BindingEventRequest) (*pb.BindingEventResponse, error)
OnBindingEvent gets invoked every time a new event is fired from a registered binding. The message carries the binding name, a payload and optional metadata.
func (*FakeServer) OnInvoke ¶
func (s *FakeServer) OnInvoke(ctx context.Context, in *cpb.InvokeRequest) (*cpb.InvokeResponse, error)
OnInvoke gets invoked when a remote service has called the app through Dapr.
func (*FakeServer) OnTopicEvent ¶
func (s *FakeServer) OnTopicEvent(ctx context.Context, in *pb.TopicEventRequest) (*pb.TopicEventResponse, error)
OnTopicEvent fired whenever a message has been published to a topic that has been subscribed. Dapr sends published messages in a CloudEvents v1.0 envelope.
func (*FakeServer) RegisterActorImplFactory ¶
func (s *FakeServer) RegisterActorImplFactory(f actor.Factory, opts ...config.Option)
func (*FakeServer) Start ¶
func (s *FakeServer) Start() error
Start registers the server and starts it.
func (*FakeServer) Stop ¶
func (s *FakeServer) Stop() error
Stop stops the previously started service.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewAsyncRuntime ¶
func (*Runtime) GetHandler ¶
func (r *Runtime) GetHandler() interface{}