Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetClientServiceAddr ¶
SetClientServiceAddr set service address with client name
func SetClientServiceName ¶
func SetClientServiceName(clientName, serviceName string)
SetClientServiceName set service name with client name
Types ¶
type Option ¶
type Option func(*Options)
Option ...
func WithRegisterInterval ¶
WithRegisterInterval the service with at interval.
func WithRegisterTTL ¶
WithRegisterTTL the service with a TTL
func WithRegistryNaming ¶
WithRegistryNaming Register for naming service discovery
type Options ¶
type Options struct {
// Broker broker.Broker
// Cmd cmd.Cmd
Client client.Client
Server server.Server
Registry *registry.Registry
// // Other options for implementations of the interface
// // can be stored in a context
Context context.Context
}
Options ...
type Service ¶
type Service interface {
// The service name
Name() string
// Init initialises options
Init(...Option)
// Options returns the current options
Options() Options
// Client is used to call services
Client() client.Client
// Server is for handling requests and events
Server() server.Server
// Run the service
Run() error
// The service implementation
String() string
// stop
Stop() error
// stop signal
NotifyStop()
}
Service is an interface that wraps the lower level libraries within go-micro. Its a convenience method for building and initialising services.
Directories
¶
| Path | Synopsis |
|---|---|
|
`grpc_opentracing` adds OpenTracing
|
`grpc_opentracing` adds OpenTracing |
|
Package profile is for profilers
|
Package profile is for profilers |
|
http
Package http enables the http profiler
|
Package http enables the http profiler |
|
pprof
Package pprof provides a pprof profiler
|
Package pprof provides a pprof profiler |
Click to show internal directories.
Click to hide internal directories.