gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/service/service.go (about) 1 // Package service encapsulates the client, server and other interfaces to provide a complete micro service. 2 package service 3 4 import ( 5 "gitee.com/liuxuezhan/go-micro-v1.18.0/client" 6 "gitee.com/liuxuezhan/go-micro-v1.18.0/server" 7 ) 8 9 // Service is an interface for a micro service 10 type Service interface { 11 // The service name 12 Name() string 13 // Init initialises options 14 Init(...Option) 15 // Options returns the current options 16 Options() Options 17 // Client is used to call services 18 Client() client.Client 19 // Server is for handling requests and events 20 Server() server.Server 21 // Run the service 22 Run() error 23 // The service implementation 24 String() string 25 }