Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Middlewares = middlewares{ Grpc: []grpc.UnaryClientInterceptor{}, HTTP: []func(c *resty.Client, r *resty.Request) error{}, }
Middlewares is the middlewares for drivers to implement their function
Functions ¶
Types ¶
type Driver ¶
type Driver interface {
// GetName return the name of the driver
GetName() string
// RegisterResolver will be called when driver used
// driver writer should use it to register grpc resolver
RegisterResolver()
// RegisterService register dtm endpoint to target. http/grpc
RegisterService(target string, endpoint string) error
// ParseServerMethod parse the gRPC url to server and method.
// server will be passed to grpc.Dial, and method to grpc.ClientConn.invoke
ParseServerMethod(uri string) (server string, method string, err error)
}
Driver is the interface to do grpc service register and discover
Click to show internal directories.
Click to hide internal directories.