From 01f0e702139911331fcf55bc6d7720009a629792 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Mon, 16 Dec 2019 17:37:11 +0000 Subject: [PATCH] add some commented out stuff --- micro.go | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/micro.go b/micro.go index 295c08c5..a8cb7368 100644 --- a/micro.go +++ b/micro.go @@ -42,8 +42,29 @@ type Function interface { Subscribe(topic string, v interface{}) error } -// Publisher is syntactic sugar for publishing +/* +// Type Event is a future type for acting on asynchronous events +type Event interface { + // Publish publishes a message to the event topic + Publish(ctx context.Context, msg interface{}, opts ...client.PublishOption) error + // Subscribe to the event + Subscribe(ctx context.Context, v in +} + +// Resource is a future type for defining dependencies +type Resource interface { + // Name of the resource + Name() string + // Type of resource + Type() string + // Method of creation + Create() error +} +*/ + +// Publisher is uses to publish messages to a topic type Publisher interface { + // Publish publishes a message to the event topic Publish(ctx context.Context, msg interface{}, opts ...client.PublishOption) error }