micro/service/mucp/mucp.go

22 lines
499 B
Go
Raw Normal View History

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