1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-23 21:44:41 +02:00

remove function

This commit is contained in:
asim
2022-07-22 20:12:24 +01:00
parent 678c227061
commit 4d63d61c20
3 changed files with 0 additions and 164 deletions

View File

@@ -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
@@ -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 {