Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
Option function
type Options ¶
type Options struct {
AppName string // 程序名称
PID int // 进程ID
LocIP string // 地IP
Uptime time.Time
Context context.Context
}
Options options
type Service ¶
type Service interface {
// Name The service name
Name() string
// Prepare prepare initialises options
Prepare(...Option)
// Options returns the current options
Options() Options
// Run the service
Run() error
Regist(Runnable)
RegistFunc(RunFunc)
}
Service is an interface that wraps the lower level libraries within go-micro. Its a convenience method for building and initialising services.
Click to show internal directories.
Click to hide internal directories.