Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Address for the HTTP server to listen on.
HTTPAddr string `yaml:"http_addr"`
// Address for the gRPC server to listen on.
GRPCAddr string `yaml:"grpc_addr"`
// Address for the HTTP server for exporting metrics
MetricsAddr string `yaml:"metrics_addr"`
}
Config represents the configuration of the Server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is used to handle requests for various management operations with Monalive, such as checking the current configuration status and reloading it.
func New ¶
func New(config *Config, metrics map[metrics.Scope]metrics.Gatherer, manager monalivepb.MonaliveManagerServer, logger *log.Logger) *Server
New creates a new Server instance with the given configuration and gRPC manager. It initializes both gRPC and HTTP servers and registers necessary services.
Click to show internal directories.
Click to hide internal directories.