Update internal service definition
This commit is contained in:
parent
b594547408
commit
fd8a0fb2f5
@ -6,11 +6,20 @@ import (
|
|||||||
"github.com/micro/go-micro/server"
|
"github.com/micro/go-micro/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Service is an interface for a micro service
|
||||||
type Service interface {
|
type Service interface {
|
||||||
|
// The service name
|
||||||
|
Name() string
|
||||||
|
// Init initialises options
|
||||||
Init(...Option)
|
Init(...Option)
|
||||||
|
// Options returns the current options
|
||||||
Options() Options
|
Options() Options
|
||||||
|
// Client is used to call services
|
||||||
Client() client.Client
|
Client() client.Client
|
||||||
|
// Server is for handling requests and events
|
||||||
Server() server.Server
|
Server() server.Server
|
||||||
|
// Run the service
|
||||||
Run() error
|
Run() error
|
||||||
|
// The service implementation
|
||||||
String() string
|
String() string
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user