micro/service/mucp/mucp.go

22 lines
499 B
Go
Raw Normal View History

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...)
return micro.NewService(opts...)
}