2019-06-08 19:40:44 +01:00
|
|
|
// Package mucp initialises a mucp service
|
|
|
|
package mucp
|
|
|
|
|
|
|
|
import (
|
|
|
|
// TODO: change to go-micro/service
|
|
|
|
"github.com/micro/go-micro"
|
2019-06-12 12:54:45 +01:00
|
|
|
cmucp "github.com/micro/go-micro/client/mucp"
|
|
|
|
smucp "github.com/micro/go-micro/server/mucp"
|
2019-06-08 19:40:44 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewService returns a new mucp service
|
|
|
|
func NewService(opts ...micro.Option) micro.Service {
|
|
|
|
options := []micro.Option{
|
2019-06-12 12:54:45 +01:00
|
|
|
micro.Client(cmucp.NewClient()),
|
|
|
|
micro.Server(smucp.NewServer()),
|
2019-06-08 19:40:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
options = append(options, opts...)
|
|
|
|
|
2019-08-20 16:48:09 +01:00
|
|
|
return micro.NewService(options...)
|
2019-06-08 19:40:44 +01:00
|
|
|
}
|