Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Name string
Config ClientConfig
Client *grpc.ClientConn
}
type ClientConfig ¶
type ClientConfig struct {
// Address specifies the client listening address like "port" or ":port",
// multiple addresses joined using ','.
Address string `json:"address"`
// AutoClose specifies the client to close the connection internally
AutoClose bool `json:"auto_close"`
// Because Timeout does not let Handlers make per-request
// decisions on each request body's acceptable deadline or
// Timeout. It is valid to use them both.
Timeout time.Duration `json:"timeout"`
//Tracing specifies whether link tracking
Tracing bool `json:"tracing"`
}
ClientConfig is the GRPC Client configuration manager.
type Server ¶
type Server struct {
Name string // Unique name for instance management.
Config ServerConfig // Configuration.
Server *grpc.Server
}
Server wraps the http.Server and provides more feature.
type ServerConfig ¶
type ServerConfig struct {
// Address specifies the server listening address like "port" or ":port",
// multiple addresses joined using ','.
Address string `json:"address"`
//Tracing specifies whether link tracking
Tracing bool `json:"tracing"`
}
ServerConfig is the GRPC Server configuration manager.
Click to show internal directories.
Click to hide internal directories.