Documentation ¶
Overview ¶
Package rpc provides an rpc service entry point.
The rpc package's constructor is expected to be passed to a bootstrapper instance in order to be autoconfigured. A fully configured instance is ready to be used as a go-micro service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService( engine RPCEngine, client client.Client, registry registry.Registry, broker messaging.BrokerWithOptions, cache cache.Cache, tracer *oteltrace.TracerProvider, rpcConfig *config.ServerConfig, resilienceConfig *config.ResilienceConfig, tracerConfig *config.TracerConfig, ) micro.Service
A micro.Service constructor. Called automatically by fx if provided to a bootstrapper instance.
Returns a fully configured and ready to use rpc based micro.Service. Panics on any error.
Types ¶
type RPCEngine ¶
type RPCEngine interface { BuildMessageHandlers() []RPCMessageHandler BuildHandlers() []interface{} }
RPCEngine provides main ways of interactions with an rpc instance.
type RPCMessageHandler ¶
type RPCMessageHandler struct { // Broker topic (queue). Topic string // Topic Handler according to go-micro spec. Handler interface{} }
RPCMessageHandler a way to set up broker message handlers.
Click to show internal directories.
Click to hide internal directories.