Skip to content

Commit

Permalink
remove function
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Jul 22, 2022
1 parent 678c227 commit 4d63d61
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 164 deletions.
81 changes: 0 additions & 81 deletions function.go

This file was deleted.

66 changes: 0 additions & 66 deletions function_test.go

This file was deleted.

17 changes: 0 additions & 17 deletions micro.go
Expand Up @@ -30,18 +30,6 @@ type Service interface {
String() string
}

// Function is a one time executing Service
type Function interface {
// Inherits Service interface
Service
// Done signals to complete execution
Done() error
// Handle registers an RPC handler
Handle(v interface{}) error
// Subscribe registers a subscriber
Subscribe(topic string, v interface{}) error
}

// Event is used to publish messages to a topic
type Event interface {
// Publish publishes a message to the event topic
Expand Down Expand Up @@ -69,11 +57,6 @@ func NewContext(ctx context.Context, s Service) context.Context {
return context.WithValue(ctx, serviceKey{}, s)
}

// NewFunction returns a new Function for a one time executing Service
func NewFunction(opts ...Option) Function {
return newFunction(opts...)
}

// NewEvent creates a new event publisher
func NewEvent(topic string, c client.Client) Event {
if c == nil {
Expand Down

0 comments on commit 4d63d61

Please sign in to comment.