mirror of
https://github.com/go-micro/go-micro.git
synced 2025-11-23 21:44:41 +02:00
working function solution
This commit is contained in:
@@ -61,6 +61,11 @@ 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...)
|
||||
}
|
||||
|
||||
// NewPublisher returns a new Publisher
|
||||
func NewPublisher(topic string, c client.Client) Publisher {
|
||||
if c == nil {
|
||||
|
||||
Reference in New Issue
Block a user